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.

Argument Reference

spreadsheetObj any

The spreadsheet object

sheet string

The sheet name or sheet number

Sample code invoking the spreadsheetGetColumnCount function

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

Expected Result: 5

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub