English | Site Directory

Google Spreadsheets APIs and Tools

Docs and Spreadsheets Data API - Frequently asked questions

Main Google Data API FAQ

The questions below are specifically targeted for the Google Spreadsheets Data API. There are, however, many questions that are applicable to all of the Google Data APIs. Visit the Google Data APIs FAQ if you do not find the question you are looking for below.

Getting Started

What is the Google Spreadsheets data API?
 
Who should use the Google Spreadsheets data API?
 
Do you have any tips or short sample code for common issues?
 
Do I need a Google Spreadsheets account to use the API?
 
Who can query a list of spreadsheets?
 
Who can query a list of worksheets in a particular spreadsheet?
 
Who can query, insert, update, or delete data in a particular spreadsheet?
 
What is the difference between the cells feed and the list feed?
 
Which namespaces should I use?
 
How do I insert a function into a cell?
 
Why should I not use POST or DELETE when editing a cells feed?
 
How do I install and use the .NET Client Library?
 
What is the Google Documents List data API?
 
Where can I find the Developer Guide?
 
What kinds of files can I upload to the Documents List API?
 
Do I need a Google Documents account to use the API?
 
Who should use the Google Documents List API?
 
Who can query a list of documents?
 
What are the available client libraries supported by Google?
 
I have a feature request or bug report. Where should I post?
 


Getting Started

What is the Google Spreadsheets data API?

The Google Spreadsheets data API is an extension of the Google Data API protocol, which you can use to create programs that interact with Google Spreadsheets. The API allows you to query for a list of spreadsheets owned by the currently authenticated user, query for a list of worksheets visible to the authenticated user in a given spreadsheet, and query, insert, update, and delete data in a spreadsheet by either cell or row.

The Google Spreadsheets data API is designed for developers who would like to integrate their applications with Google Spreadsheets. To get started:

http://code.google.com/apis/spreadsheets/

Who should use the Google Spreadsheets data API?

The API is designed to help anyone interested in publishing their Google Spreadsheets' data with other users through mash-ups and developers wishing to integrate their applications with Google Spreadsheets.

If you're a new or casual user of Google Spreadsheets, we suggest you start or continue using Google Spreadsheets through the online editor. To get started, go to http://spreadsheets.google.com/.

If you need to develop a more sophisticated application, you might want to consider the Google Spreadsheets data API. This method will allow you to programmatically manage spreadsheets in Google Spreadsheets. Developers should be familiar with the HTTP protocol. You can start here:

http://code.google.com/apis/spreadsheets/

Do you have any tips or short sample code for common issues?
You should browse the Google Data API Tips Blog for help with both our client libraries and making raw requests. The Client Libraries and Sample Code page also lists some additional resources.
Do I need a Google Spreadsheets account to use the API?

To query a published Google Spreadsheets spreadsheet using the API, no.

To insert, update, delete, or query data in a spreadsheet or to query for a list of your spreadsheets, you'll need to authenticate using a Google Spreadsheets account. You can authenticate using an AuthSub (authentication for web applications) token or the username and password for a Google Spreadsheets account. You can register for a Google Spreadsheets account at docs.google.com.

Who can query a list of spreadsheets?

An authenticated Google Spreadsheets user can query the list of spreadsheets for which they have edit or view permissions.

Who can query a list of worksheets in a particular spreadsheet?

Worksheets in a published Google Spreadsheets spreadsheet can be queried by just about anyone. Unpublished workheets, however, can be queried only by those that were granted view or edit permissions.

Who can query, insert, update, or delete data in a particular spreadsheet?

A published spreadsheet can be queried at the list and cell levels by just about anyone.

For unpublished spreadsheets, an authenticated Google Spreadsheets user can view or edit (insert, update, delete) spreadsheet data only if given specific permission to do so.

What is the difference between the cells feed and the list feed?

In a list-based feed, each feed entry contains the data of a row, while in a cells-based feed, each entry represents an individual cell. You can learn more about the available feeds in the Google Spreadsheets Data API Developer's Guide.

Which namespaces should I use?

When inserting, updating or deleting an entry in a cells or list feed, be sure to remember the appropriate XML namespaces.

The gs:cell element in a cells entry is in the XML namespace:

xmlns:gs='http://schemas.google.com/spreadsheets/2006'

The gsx:{column_name} elements in a list entry is in the XML namespace:

xmlns:gsx='http://schemas.google.com/spreadsheets/2006/extended'

How do I insert a function into a cell?

Functions can only be inserted through the cells feed. To insert a function, update the cell from the cells feed with the desired formula as a string. You can see an example in the Change contents of a cell section of the Developer's Guide.

Why should I not use POST or DELETE when editing a cells feed?

When editing a cells feed you should use PUT for adding data to a blank cell and clearing data from a blank cell in addition to updating the contents of a cell. The POST and DELETE methods on the cells feed are deprecated.

How do I install and use the .NET Client Library?

You can find more information in the Getting Started article for .NET:

http://code.google.com/apis/gdata/articles/dotnet_client_lib.html

What is the Google Documents List data API?

The Google Documents List data API is an extension of the Google data API protocol, which you can use to create programs that interact with Google Documents. The API allows you to query for a list of word processor documents and/or spreadsheets that contain a given search term or have titles matching a search term. It also allows you to upload existing word processor documents or spreadsheets to Google Documents.

The Google Documents List data API is designed for developers who would like to integrate their applications with Google Documents. Visit here to get started:

http://code.google.com/apis/documents/

Where can I find the Developer Guide?

The Developer Guide for Spreadsheets can be found at: http://code.google.com/apis/spreadsheets/developers_guide_protocol.html

The Developer Guide for Documents List can be found at: http://code.google.com/apis/documents/developers_guide_protocol.html

What kinds of files can I upload to the Documents List API?
The following file types can be uploaded via the Google Documents List API:
File extensionMIME type
CSVtext/csv
TSVtext/tab-separated-values
TABtext/tab-separated-values
HTMLtext/html
HTMtext/html
DOCapplication/msword
ODSapplication/x-vnd.oasis.opendocument.spreadsheet
ODTapplication/vnd.oasis.opendocument.text
RTFapplication/rtf
SXWapplication/vnd.sun.xml.writer
TXTtext/plain
XLSapplication/vnd.ms-excel
PPTapplication/vnd.ms-powerpoint
PPSapplication/vnd.ms-powerpoint
Do I need a Google Documents account to use the API?

Yes, in order to retrieve a list of documents or upload documents to the Google Documents service, you will need to sign up for an account at http://docs.google.com.

Who should use the Google Documents List API?

The API is designed to help anyone interested in uploading their existing documents to their Google Documents account programmatically and for developers wishing to integrate their applications with Google Documents.

If you have not created a Google Documents account please visit http://docs.google.com.

If you wish to create an application which can programmatically upload to or access your list of documents, then the Google Documents List API can enable you to do so. Developers should be familiar with XML and the HTTP protocol. Further information on how to begin can be found here:

http://code.google.com/apis/documents/

Who can query a list of documents?

An authenticated Google Documents user can query the list of documents that belong to them.

What are the available client libraries supported by Google?

Java, .NET, Python and Objective-C client libraries are officially supported by Google. Using these libraries, you can construct Google Data requests, send them to a service, and process server responses.

If you write a client library in a language other than Java, .Net, Python or Objective-C, and would like to share with the Google Data developer community, please post in the Google Data discussion group. We would love to hear from you!

In addition, our partner Zend has written a Google Data PHP client library.

I have a feature request or bug report. Where should I post?

Post a detailed description on the Google Docs Data APIs discussion group:

http://groups.google.com/group/Google-Docs-Data-APIs