User Guide Cancel

spreadsheetIsBinaryFormat

 

Description

Checks if the spreadsheet is in a binary format.

Returns

True, if spreadsheet is binary, else, false. 

History

  • ColdFusion (2025 release): Added the function.

Syntax

spreadsheetIsBinaryFormat(spreadSheetObject)
spreadsheetIsBinaryFormat(spreadSheetObject)
spreadsheetIsBinaryFormat(spreadSheetObject)

Parameters

Name

 

 

Required

 

 

Type

 

 

Description

 

 

spreadSheetObject

 

 

Yes

 

 

ExcelInfo 

 

 

The Excel spreadsheet object whose format needs to be checked.

 

Example

<cfquery name="art" datasource="cfartgallery">
SELECT * FROM ART
</cfquery>
<cfscript>
theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art-another.xls";
// create a spreadsheet object
theSheet=spreadsheetNew("SampleData")
// add rows from the table to the spreadsheet
spreadsheetAddRows(theSheet,art)
// write the spreadsheet
spreadsheetWrite(theSheet,theFile,"yes")
// check if spreadsheet is binary
isBinary=spreadsheetIsBinaryFormat(theSheet)
writeOutput(isBinary) // YES
</cfscript>
<cfquery name="art" datasource="cfartgallery"> SELECT * FROM ART </cfquery> <cfscript> theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art-another.xls"; // create a spreadsheet object theSheet=spreadsheetNew("SampleData") // add rows from the table to the spreadsheet spreadsheetAddRows(theSheet,art) // write the spreadsheet spreadsheetWrite(theSheet,theFile,"yes") // check if spreadsheet is binary isBinary=spreadsheetIsBinaryFormat(theSheet) writeOutput(isBinary) // YES </cfscript>
<cfquery name="art" datasource="cfartgallery">
    SELECT * FROM ART
</cfquery>
<cfscript>
    theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art-another.xls";
    // create a spreadsheet object
    theSheet=spreadsheetNew("SampleData")
    // add rows from the table to the spreadsheet
    spreadsheetAddRows(theSheet,art)
    // write the spreadsheet
    spreadsheetWrite(theSheet,theFile,"yes")
    // check if spreadsheet is binary
    isBinary=spreadsheetIsBinaryFormat(theSheet)
    writeOutput(isBinary) // YES
</cfscript>

Get help faster and easier

New user?