RGoogleDocs (version 0.7-0)

addWorksheet: Add an empty worksheet to a spreadsheet or a new spreadsheet

Description

The addWorksheet function can be used to add one, empty worksheet to an existing spreadsheet. The new worksheet can be given dimensions and a title.

addSpreadsheet adds a new spreadsheet to the list of Google documents by uploading an empty spreadsheet with the specified dimensions.

Usage

addWorksheet(doc, con, dim, title = "", asSheetRef = TRUE, ...) addSpreadsheet(con, dim = c(20, 10) , name = "Sheet")

Arguments

doc
either the name of or a “reference”
con
the authenticated connection to the Google Spreadsheets API. This must be for the "wise" service rather than the general "writely" service. So this should be an object of class "GoogleSpreadsheetsConnection" created with a call of the form getGoogleDocsConnection(login, password, "wise").
dim
the desired dimensions (rows and columns) of the new worksheet.
title
a character string giving the title for the new worksheet
asSheetRef
a logical value indicating whether the result should be a GoogleWorksheetRef-class object or the status of the HTTP request to add the worksheet.
...
additional arguments passed on to curlPerform which submits the request.
name
a character string giving the name of the spreadsheet document

Value

If asSheetRef is TRUE, an object of GoogleWorksheetRef-class.If asSheetRef is FALSE, the status of the HTTP request from curlPerform.

See Also

getDocs getGoogleDocsConnection getGoogleAuth

Examples

Run this code

Run the code above in your browser using DataLab