User Guide Cancel

spreadsheetIscolumnHidden

 

Description

Checks if the specified column in a sheet is hidden.

Returns

True if the column is hidden. False, otherwise. 

History

  • ColdFusion (2025 release): Added the function.

Syntax

spreadsheetIsRowHidden(spreadSheetObject,column)
spreadsheetIsRowHidden(spreadSheetObject,column)
spreadsheetIsRowHidden(spreadSheetObject,column)

Parameters

Name

 

 

Required

 

 

Type

 

 

Description

 

 

spreadSheetObject

 

 

Yes

 

 

ExcelInfo 

 

 

The Excel spreadsheet object to check whether the column is hidden.

 

column

 

 

Yes

 

 

Integer 

 

 

The column to check if it's hidden.

 

 

Example

<cfquery name="art" datasource="cfartgallery">
SELECT * FROM ART
</cfquery>
<cfscript>
theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art-col-hidden.xls";
// create a spreadsheet object
theSheet=spreadsheetNew("SampleData")
// add rows from the table to the spreadsheet
spreadsheetAddRows(theSheet,art)
// hide column 6 in the spreadsheet
spreadsheetSetColumnHidden(theSheet,6,"TRUE")
// write the spreadsheet
spreadsheetWrite(theSheet,theFile,"yes")
// check if column is hidden
isHidden=spreadsheetIsColumnHidden(theSheet,6)
writeOutput(isHidden) // YES
</cfscript>
<cfquery name="art" datasource="cfartgallery"> SELECT * FROM ART </cfquery> <cfscript> theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art-col-hidden.xls"; // create a spreadsheet object theSheet=spreadsheetNew("SampleData") // add rows from the table to the spreadsheet spreadsheetAddRows(theSheet,art) // hide column 6 in the spreadsheet spreadsheetSetColumnHidden(theSheet,6,"TRUE") // write the spreadsheet spreadsheetWrite(theSheet,theFile,"yes") // check if column is hidden isHidden=spreadsheetIsColumnHidden(theSheet,6) writeOutput(isHidden) // YES </cfscript>
<cfquery name="art" datasource="cfartgallery">
    SELECT * FROM ART
</cfquery>
<cfscript>
    theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art-col-hidden.xls";
    // create a spreadsheet object
    theSheet=spreadsheetNew("SampleData")
    // add rows from the table to the spreadsheet
    spreadsheetAddRows(theSheet,art)
    // hide column 6 in the spreadsheet
    spreadsheetSetColumnHidden(theSheet,6,"TRUE")
    // write the spreadsheet
    spreadsheetWrite(theSheet,theFile,"yes")
    // check if column is hidden
    isHidden=spreadsheetIsColumnHidden(theSheet,6)
    writeOutput(isHidden) // YES
</cfscript>

Get help faster and easier

New user?