Whatever message this page gives is out now! Go check it out!

spreadsheetSetRowHidden

Last update:
May 18, 2026

Description

Hides specific rows in a worksheet. When applied, this function allows you to hide rows without deleting them, so the data remains in the spreadsheet but is not visible on the screen.

Returns

None

History

  • ColdFusion (2025 release): Added the function.

Syntax

spreadsheetSetRowHidden(spreadSheetObject,row,hide)

Parameters

Name
Required
Type
Description
spreadSheetObject
Yes
ExcelInfo
The Excel spreadsheet object where the row is to be hidden or displayed.
row
Yes
Integer
The row number which needs to be hidden.
hide
No
Boolean
True to hide the row. False to show the row.

Example

<cfquery name="art" datasource="cfartgallery">
    SELECT * FROM ART
</cfquery>
<cfscript>
    theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art-row-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
    spreadsheetSetRowHidden(theSheet,1,"TRUE")
    // write the spreadsheet
    spreadsheetWrite(theSheet,theFile,"yes")
</cfscript>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page