spreadsheetGetColumnCount

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, OpenBD, etc.

spreadsheetGetColumnCount Argument Reference

spreadsheetObj any
Required

The spreadsheet object

sheet string

The sheet name or sheet number

Examples sample code invoking the spreadsheetGetColumnCount function

s = spreadsheetNew();
spreadsheetAddRow(s,"Name,Beers,Vegetables,Fruits,Meats");
writeOutput( spreadsheetGetColumnCount( s ) ); 

Expected Result: 5


Fork me on GitHub