Spreadsheet List vs Table

20 views
Skip to first unread message

JustinXXVII

unread,
Dec 29, 2009, 10:05:46 AM12/29/09
to Google Data APIs Objective-C Client Library Discussion
Hello, I'm trying to differentiate a list and a table when it comes to
updating a spreadsheet. My software creates CSV files with specific,
non-changing columns. The top row is like the field name, and each
column is only one type of data.

The first row would go like this:
Year Month Week Day Score

Subsequent rows would look like this:
2009 12 1 12/1/2009 5000

Should I be using GDataEntrySpreadsheetList or
GDataEntrySpreadsheetTable to update the spreadsheet?

Also, once I authenticate, if the spreadsheet does not currently
exist, I want to create a new spreadsheet with just the top row. Do I
have to upload a CSV file, or can I do it programatically through the
API?

Thank you for your time!

Greg Robbins

unread,
Dec 29, 2009, 11:40:54 AM12/29/09
to gdata-objec...@googlegroups.com
The List API will be deprecated; use the Table and Records API.

As far as I'm aware, the way to create a new spreadsheet is still to upload a csv file. But that's an appropriate question for the Spreadsheet API group, 

JustinXXVII

unread,
Dec 29, 2009, 2:36:14 PM12/29/09
to Google Data APIs Objective-C Client Library Discussion
Thanks, I posted in that forum.

On a more Objective-C topic, when it comes to inserting row data
beneath the columns, do I specify the Column Letter, like A,B,C, or
the name of the value at the top, like Date or Score? I'm trying to
make sense of some of the comments in the classes. See
GDataSpreadsheetData.h :

// For table data, like
// <gs:data startRow="2" numRows="6" >
// <gs:column index="a" name="Name" />
// <gs:column index="b" name="Birthday" />
// </gs:data>

When I wrap my Year, Month, Week, Date, Score data, do I reference it
like ColumnIndex:A name:@"Year"? The first comment indicates
startRow, which means I am not necessarily inserting on the top line.
How can I be sure that all column data gets entered in the correct
column?

Thanks Greg,
Justin

Greg Robbins

unread,
Dec 29, 2009, 3:15:10 PM12/29/09
to gdata-objec...@googlegroups.com
A table is a rectangular section of one worksheet of a spreadsheet. Each row of a table is a record.

The table sample app's method -addTableToSelectedWorksheet shows how to add a table to a worksheet; -fetchSelectedSpreadsheet shows how to list the worksheets and tables in a spreadsheet.

Each record is a list of fields, and each field has a name. The sample app's method -randomizeSelectedTable shows how to change the fields of a record.

I think generally you want to address fields of records by their names, not their indexes, but I'm not certain about what is required by the server. You might ask for additional clarification in the Spreadsheet API group, or just experiment.

Reply all
Reply to author
Forward
0 new messages