Returns the number of columns in a given spreadsheet.

spreadsheetAddRow(spreadsheetObj, [sheet]) → returns numeric

This function requires Adobe ColdFusion 2016 and up.  Not supported on Lucee, etc.

spreadsheetGetColumnCount Argument Reference

spreadsheetObj any

The spreadsheet object

sheet string

The sheet name or sheet number

Examples sample code invoking the spreadsheetGetColumnCount function

s = spreadsheetNew();
writeOutput( spreadsheetGetColumnCount( s ) ); 

Expected Result: 5

Fork me on GitHub