Skip to content
Julian Halliwell edited this page Aug 6, 2024 · 7 revisions

Sets the value for a cell. If the cell doesn't exist it will be created.

setCellValue( workbook, value, row, column[, type ] )

Required arguments

  • workbook spreadsheet object
  • value any: value to set
  • row numeric
  • column numeric

Optional arguments

  • datatype string: force the value to be set as one of the following data types:
    • "blank"
    • "boolean"
    • "date"
    • "numeric"
    • "string"

Chainable? Yes.

Example 1

spreadsheet = New spreadsheet();
workbook = spreadsheet.new();
spreadsheet.setCellValue( workbook, "test", 1, 1 );

Example 2 with specified data type

spreadsheet = New spreadsheet();
workbook = spreadsheet.new();
spreadsheet.setCellValue( workbook, "true", 1, 1, "boolean" );
Clone this wiki locally