Skip to content
Julian Halliwell edited this page Sep 20, 2021 · 3 revisions

Returns a struct showing the current formatting attributes of the specified cell in the active sheet.

getCellFormat( workbook, row, column );

Required arguments

  • workbook spreadsheet object
  • row numeric
  • column numeric

Chainable? Yes but ends the chain.

Return value keys

The method returns a struct with the following keys:

alignment (string)

bold (boolean)

bottomborder (string)

bottombordercolor (string): RGB Triplet, e.g. "255,0,0"

color (string): RGB Triplet, e.g. "255,0,0"

dataformat (string)

fgcolor (string): RGB Triplet, e.g. "255,0,0"

fillpattern (string)

font (string)

fontsize (integer)

indent (integer)

italic (boolean)

leftborder (string)

leftbordercolor (string): RGB Triplet, e.g. "255,0,0"

rightborder (string)

rightbordercolor (string): RGB Triplet, e.g. "255,0,0"

rotation (integer)

strikeout (boolean)

topborder (string)

topbordercolor (string): RGB Triplet, e.g. "255,0,0"

textwrap (boolean)

underline (string) e.g. "single" or "double"

verticalalignment

Example

data = QueryNew( "First,Last", "VarChar,VarChar", [ [ "a","b" ] ] );
spreadsheet = New spreadsheet();
workbook = spreadsheet.workbookFromQuery( data );
spreadsheet.formatCell( workbook, { bold: true }, 1, 1 );
cellFormats = spreadsheet.getCellFormat( workbook, 1, 1 );
Clone this wiki locally