-
-
Notifications
You must be signed in to change notification settings - Fork 39
addColumn
Julian Halliwell edited this page Aug 12, 2016
·
17 revisions
Adds a column or column data to a spreadsheet object.
addColumn( workbook, data [, startRow [, startColumn [, insert [, delimiter [, autosize ] ] ] ] ] )
-
workbookspreadsheet object -
datastring: a delimited list of cell values, one list item per row being added to the column. The default delimiter is a comma, but you can specify a different delimiter.
-
startRownumeric: the number of the row at which to start adding the column data. Ifinsert=trueall cells above the start row will be empty. If you omit this argument the column is inserted at the first row after the current last column. -
startColumnnumeric: the number of the column in which to add the data. -
insertboolean default=true: whether to insert the new data or replace existing values. -
delimiterstring default=",": the character separating column values in yourdata. If your values contain commas, use an alternative delimiter not contained in your data, e.g. | -
autosizeboolean default=false: whether to adjust the column width automatically to fit the data added.
##Examples
spreadsheet = New spreadsheet();
workbook = spreadsheet.new();
spreadsheet.addColumn( workbook,"a,b" );
// If your data contains commas, use a different delimiter
spreadsheet.addColumn( workbook=workbook,data="Champion, the wonder horse|Bagpuss",delimiter="|" );