Skip to content
Julian Halliwell edited this page Jun 22, 2024 · 5 revisions

Returns properties of the currently active, or specified sheet within a workbook as a struct.

sheetInfo( workbook[, sheetNumber ] )

Required arguments

  • workbook spreadsheet object

Optional arguments

  • sheetNumber numeric: specific sheet to return info about (default is the currently active sheet)

Chainable? Yes but ends the chain.

Properties returned

  • displaysAutomaticPageBreaks (boolean)
  • displaysFormulas (boolean)
  • displaysGridlines (boolean)
  • displaysRowAndColumnHeadings (boolean)
  • displaysZeros (boolean)
  • hasComments (boolean)
  • hasMergedRegions (boolean)
  • isCurrentActiveSheet (boolean)
  • isHidden (boolean)
  • isRightToLeft (boolean)
  • name (string)
  • numberOfMergedRegions (integer)
  • position (integer) from version 4.1.0
  • printsFitToPage (boolean)
  • printsGridlines (boolean)
  • printsHorizontallyCentered (boolean)
  • printsRowAndColumnHeadings (boolean)
  • printsVerticallyCentered (boolean)
  • recalculateFormulasOnNextOpen (boolean)
  • visibility (string): one of "VISIBLE", "HIDDEN", "VERY_HIDDEN"

Example

spreadsheet = New spreadsheet();
workbook = spreadsheet.new();
firstSheetProperties = spreadsheet.sheetInfo( workbook );
spreadsheet.createSheet( workbook, "second sheet" );
secondSheetProperties = spreadsheet.sheetInfo( workbook, 2 );
Clone this wiki locally