SpreadsheetReadBinary

Description

Reads and stores content from a spreadsheet object and returns it as a byte array.

Returns

Returns a byte array of the stored spreadsheet information using the cfcontent tag.

Category

Microsoft Office Integration

Function syntax

SpreadsheetReadBinary(spreadsheetobj)

History

ColdFusion 9: Added the function.

Parameters

Parameter

Description

spreadSheetObject

The Excel spreadsheet object to read.

Usage

Example

<cfheader name="Content-Disposition" value="inline; filename=test.xls"> 
<cfset a = spreadhsheetnew()> 
<cfset spreadsheetAddRow(a,"a,b,c")> 
<!---You can do all the processing---> 
<cfset bin = spreadsheetReadBinary(a)> 
<cfcontent type="application/vnd-ms.excel" variable="#bin#" reset="true">