Net::Google::Spreadsheetsを公開しました! Nobuo Danjou http://search.cpan.org/dist/Net-Google-Spreadsheets/ やっとのことでリリースしましたよ。こんなの作るだけで2週間もかかってるとか信じられません。トロいよ。トロすぎるよ。使い方はSYNOPSISから転載すると use Net::Google::Spreadsheets; my $service = Net::Google::Spreadsheets->new( username => 'myname@gmail.com', password => 'mypassword' ); my @spreadsheets = $service->spreadsheets(); # find a spreadsheet by key my $spreadsheet = $service->spreadsheet( { key => 'key_of_a_spreasheet' } ); # find a spreadsheet by title my $spreadsheet_by_title = $service->spreadsheet( { title => 'list for new year cards' } ); # find a worksheet by title my $worksheet = $spreadsheet->worksheet( { title => 'Sheet1' } ); # create a worksheet my $new_worksheet = $spreadsheet->add_worksheet( { title => 'Sheet2', row_count => 100, col_count => 3, } ); # update cell by batch request $worksheet->batchupdate_cell( {row => 1, col => 1, input_value => 'name'}, {row => 1, col => 2, input_value => 'nick'}, {row => 1, col => 3, input_value => 'mail'}, ); # get a cell my $cell = $worksheet->cell({col => 1, row => 1}); # update input value of a cell $cell->input_value('new value'); # add a row my $new_row = $worksheet->add_row( { name => 'Nobuo Danjou', nick => 'lopnor', mail => 'nobuo.danjou@gmail.com', } ); # fetch rows my @rows = $worksheet->rows; # search a row my $row = $worksheet->row({sq => 'name = "Nobuo Danjou"'}); # update content of a row $row->content( { nick => 'lopnor', mail => 'nobuo.danjou@gmail.com', } ); と、こんな感じ。コードはなんか中途半端だけどまずはリリース優先で出しちゃいました。サラのワークシートを作ってrowを使いたいときは、まずbatchupdate_cellで1行目にカラム名を入れないといけないので注意です。 Written on 2008-12-29. Categories: Tags: Next: DBD::Fileを読む Previous: しゅうりょうー