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

StreamingspreadsheetNew

Last update:
May 18, 2026
Caution:
Some older methods for reading and writing spreadsheets may not work for streaming spreadsheet objects if they attempt to operate on rows that are not yet loaded into memory at the time of invocation.

Description

Creates a streaming spreadsheet, which represents a single sheet of an Excel document.

Returns

A spreadsheet object with streaming capabilities for read/write/update operations.

History

  • ColdFusion (2025 release): Added the function.

Syntax

streamingSpreadsheetNew(sheetName, randomAccessWindowSize

Parameters

Name
Required
Type
Description
sheetName
No
String
The name of the sheet to be created.
If you do not specify any parameter, a sheet with the name sheet1 is created.
randomAccessWindowSize
No
Integer
The number of rows to be kept in memory at a time. The default value is 100.
Note:
If you do not specify any parameter, a sheet with the name sheet1 is created having size = 100

Example

<cfscript> 
   theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "streamingSpreadsheetNewDoc.xlsx"; 
   obj = streamingSpreadsheetNew("Sheet 1",100) 
   SpreadsheetSetCellValue(obj,"365",1,4); 
   // write values to the spreadsheet 
   spreadsheetwrite(obj, theFile,"",true,false);    
</cfscript>
Figure: Output from streamingSpreadsheetNew function
Output from streamingSpreadsheetNew function
The next example shows the usage of randomAccessWindowSize of 10.
<cfscript> 
   theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "streamingSpreadsheetNewDoc.xlsx"; 
   obj = streamingSpreadsheetNew("Sheet 1",10) 
   SpreadsheetSetCellValue(obj,"365",1,4); 
   spreadsheetwrite(obj, theFile,"",true,false); 
</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