Hi,
I
am currently trying to switch to Net::Google::Spreadsheets::V4.
The following code is from the example in the module's files and shows how to write/update data into the sheet.
I would like to iterate the rows of the spreasheet.
Can you explain me how to iterate into google sheet, row by row ?
I am stuck.
Thank you very much.
my @rows = (
[qw(name age favorite exodus)], # header
[qw(tarounina 31 curry has)],
[qw(jirou 18 gyoza begun)],
[qw(saburou 27 ramen NPG)],
);
for my $row (@rows) {
push @requests, {
pasteData => {
coordinate => {
sheetId => $sheet_prop->{sheetId},
rowIndex => $idx++,
columnIndex => 0,
},
data => $gs->to_csv(@$row),
type => 'PASTE_NORMAL',
delimiter => ',',
},
};
}
($content, $res) = $gs->request(
POST => ':batchUpdate',
{
requests => \@requests,
},
);
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.