| GData Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | ||||
#include <gdata/services/documents/gdata-documents-spreadsheet.h>
GDataDocumentsSpreadsheet;
GDataDocumentsSpreadsheetClass;
enum GDataDocumentsSpreadsheetFormat;
GDataDocumentsSpreadsheet * gdata_documents_spreadsheet_new
(const gchar *id);
GFile * gdata_documents_spreadsheet_download_document
(GDataDocumentsSpreadsheet *self,
GDataDocumentsService *service,
gchar **content_type,
GDataDocumentsSpreadsheetFormat export_format,
gint gid,
GFile *destination_directory,
gboolean replace_file_if_exists,
GCancellable *cancellable,
GError **error);
GObject +----GDataParsable +----GDataEntry +----GDataDocumentsEntry +----GDataDocumentsSpreadsheet
GDataDocumentsSpreadsheet is a subclass of GDataDocumentsEntry to represent a spreadsheet from Google Documents.
For more details of Google Documents' GData API, see the online documentation.
typedef struct _GDataDocumentsSpreadsheet GDataDocumentsSpreadsheet;
All the fields in the GDataDocumentsSpreadsheet structure are private and should never be accessed directly.
Since 0.4.0
typedef struct {
} GDataDocumentsSpreadsheetClass;
All the fields in the GDataDocumentsSpreadsheetClass structure are private and should never be accessed directly.
Since 0.4.0
typedef enum {
GDATA_DOCUMENTS_SPREADSHEET_XLS = 0,
GDATA_DOCUMENTS_SPREADSHEET_CSV,
GDATA_DOCUMENTS_SPREADSHEET_PDF,
GDATA_DOCUMENTS_SPREADSHEET_ODS,
GDATA_DOCUMENTS_SPREADSHEET_TSV,
GDATA_DOCUMENTS_SPREADSHEET_HTML
} GDataDocumentsSpreadsheetFormat;
The different available download formats for spreadsheets.
| Microsoft Excel spreadsheet (XLS) format | |
| Comma-Separated Values (CSV) format | |
| Portable Document Format (PDF) | |
| OpenDocument Spreadsheet (ODS) format | |
| Tab-Separated Values (TSV) format | |
| HyperText Markup Language (HTML) format |
Since 0.4.0
GDataDocumentsSpreadsheet * gdata_documents_spreadsheet_new (const gchar *id);
Creates a new GDataDocumentsSpreadsheet with the given entry ID ("id").
|
the entry's ID (not the document ID of the spreadsheet), or NULL
|
Returns : |
a new GDataDocumentsSpreadsheet, or NULL; unref with g_object_unref()
|
Since 0.4.0
GFile * gdata_documents_spreadsheet_download_document
(GDataDocumentsSpreadsheet *self,
GDataDocumentsService *service,
gchar **content_type,
GDataDocumentsSpreadsheetFormat export_format,
gint gid,
GFile *destination_directory,
gboolean replace_file_if_exists,
GCancellable *cancellable,
GError **error);
Downloads and returns the spreadsheet file represented by the GDataDocumentsSpreadsheet. If the document doesn't exist,
NULL is returned, but no error is set in error. TODO: What?
If cancellable is not NULL, then the operation can be cancelled by triggering the cancellable object from another thread.
If the operation was cancelled, the error G_IO_ERROR_CANCELLED will be returned.
When requesting a GDATA_DOCUMENTS_SPREADSHEET_CSV or GDATA_DOCUMENTS_SPREADSHEET_TSV file you must specify an additional
parameter called gid which indicates which grid, or sheet, you wish to get (the index is 0-based, so gid 1 actually refers
to the second sheet sheet on a given spreadsheet).
If there is an error getting the document, a GDATA_SERVICE_ERROR_WITH_QUERY error will be returned.
|
a GDataDocumentsPresentation |
|
a GDataDocumentsService |
|
return location for the document's content type, or NULL; free with g_free()
|
|
the format in which the presentation should be exported |
|
the 0-based sheet ID to download, or -1
|
|
the directory into which the presentation file should be saved |
|
TRUE if the file should be replaced if it already exists, FALSE otherwise
|
|
optional GCancellable object, or NULL
|
|
a GError, or NULL
|
Returns : |
the document's data, or NULL; unref with g_object_unref()
|
Since 0.4.0