GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::GOOGLE::SPREADSHEETS::WORKSHEET (3)

.ds Aq ’

NAME

Net::Google::Spreadsheets::Worksheet - Representation of worksheet.

CONTENTS

SYNOPSIS



  my $service = Net::Google::Spreadsheets->new(
    username => mygoogleaccount@example.com,
    password => mypassword,
  );

  my $ss = $service->spreadsheet(
    {
        key => key_of_a_spreasheet
    }
  );

  my $worksheet = $ss->worksheet({title => Sheet1});

  # update cell by batch request
  $worksheet->batchupdate_cell(
    {col => 1, row => 1, input_value => name},
    {col => 2, row => 1, input_value => nick},
    {col => 3, row => 1, input_value => mail},
    {col => 4, row => 1, input_value => age},
  );

  # get a cell object
  my $cell = $worksheet->cell({col => 1, row => 1});

  # add a row
  my $new_row = $worksheet->add_row(
    {
        name => Nobuo Danjou,
        nick => lopnor,
        mail => danjou@soffritto.org,
        age  => 33,
    }
  );

  # get rows
  my @rows = $worksheet->rows;

  # search rows
  @rows = $worksheet->rows({sq => age > 20});

  # search a row
  my $row = $worksheet->row({sq => name = "Nobuo Danjou"});

  # delete the worksheet
  # Note that this will fail if the worksheet is the only one
  # within the spreadsheet.

  $worksheet->delete;



METHODS

    rows(\%condition)

Returns a list of Net::Google::Spreadsheets::Row objects. Acceptable arguments are:
o sq

Structured query on the full text in the worksheet. see the URL below for detail.

o orderby

Set column name to use for ordering.

o reverse

Set ’true’ or ’false’. The default is ’false’.

See <http://code.google.com/intl/en/apis/spreadsheets/docs/3.0/reference.html#ListParameters> for details. Note that ’the first row of the worksheet’ you can see with the browser is ’header’ for the rows, so you can’t get it with this method. Use cell(s) method instead if you need to access them.

    row(\%condition)

Returns first item of rows(\%condition) if available.

    add_row(\%contents)

Creates new row and returns a Net::Google::Spreadsheets::Row object representing it. Arguments are contents of a row as a hashref.



  my $row = $ws->add_row(
    {
        name => Nobuo Danjou,
        nick => lopnor,
        mail => danjou@soffritto.org,
        age  => 33,
    }
  );



    cells(\%args)

Returns a list of Net::Google::Spreadsheets::Cell objects. Acceptable arguments are:
o min-row
o max-row
o min-col
o max-col
o range
o return-empty
See <http://code.google.com/intl/en/apis/spreadsheets/docs/3.0/reference.html#CellParameters> for details.

    cell(\%args)

Returns Net::Google::Spreadsheets::Cell object. Arguments are:
o col
o row

    batchupdate_cell(@args)

update multiple cells with a batch request. Pass a list of hash references containing:
o col
o row
o input_value

    delete

Deletes the worksheet. Note that this will fail if the worksheet is only one within the spreadsheet.

SEE ALSO

<https://developers.google.com/google-apps/spreadsheets/>

Net::Google::AuthSub

Net::Google::Spreadsheets

AUTHOR

Nobuo Danjou <danjou@soffritto.org>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::GOOGLE::SPREADSHEETS::WORKSHEET (3) 2012-04-30

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.