Skip to content
Julian Halliwell edited this page Sep 5, 2017 · 4 revisions

Returns the maximum number of columns in the currently active or specified sheet.

getColumnCount( workbook [, sheetNameOrNumber ] )

Required arguments

  • workbook spreadsheet object

Optional arguments

  • sheetNameOrNumber string OR numeric: the name or number of the sheet within the workbook to operate on. If you omit this argument, the currently active sheet will be used.

Example

spreadsheet=New spreadsheet();
workbook=spreadsheet.new();
spreadsheet.addRow( workbook,"1a,1b" );
spreadsheet.addRow( workbook,"2a,2b,2c" );
spreadsheet.addRow( workbook,"3a" );
maxColumns=spreadsheet.getColumnCount( workbook );//returns 3;
Clone this wiki locally