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

Gets the width of a column in the currently active sheet as the number of "character widths", where the reference character is normally 0 in the workbook's default font. NB: the default fonts may differ between XLS and XLSX formats.

getColumnWidth( workbook, column )

Required arguments

  • workbook spreadsheet object
  • column numeric

Chainable? Yes but ends the chain.

Example

data = QueryNew( "First,Last", "VarChar,VarChar", [ [ "Susi","Sorglos" ], [ "Frumpo","McNugget" ] ] );
spreadsheet = New spreadsheet();
workbook = spreadsheet.workbookFromQuery( data );
spreadsheet.setColumnWidth( workbook, 1, 50 );
columnOneWidth = spreadsheet.getColumnWidth( workbook, 1 ); //50
Clone this wiki locally