Last updated on
Feb 25, 2025
Description
Retrieves the active cell created using the spreadsheetSetActiveCell function.
Returns
A struct with the row and column of the active cell.
History
ColdFusion (2025 release): Added the function.
Syntax
spreadsheetGetActiveCell(spreadSheetObject)
spreadsheetGetActiveCell(spreadSheetObject)
spreadsheetGetActiveCell(spreadSheetObject)
Parameters
Name
|
Required
|
Type
|
Description
|
spreadSheetObject
|
Yes
|
ExcelInfo
|
The Excel spreadsheet object from which to retrieve the hyperlinks.
|
Example
<cfquery name="art" datasource="cfartgallery">
SELECT * FROM ART
</cfquery>
<cfscript>
theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art.xls";
// create a spreadsheet object
theSheet=spreadsheetNew("SampleData")
// add rows from query
spreadsheetAddRows(theSheet,art)
// set active cell 1,6
spreadsheetSetActiveCell(theSheet,10,6)
spreadsheetWrite(theSheet,theFile,"yes")
infoActiveCell=spreadsheetGetActiveCell(theSheet)
writeDump(infoActiveCell)
</cfscript>
<cfquery name="art" datasource="cfartgallery">
SELECT * FROM ART
</cfquery>
<cfscript>
theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art.xls";
// create a spreadsheet object
theSheet=spreadsheetNew("SampleData")
// add rows from query
spreadsheetAddRows(theSheet,art)
// set active cell 1,6
spreadsheetSetActiveCell(theSheet,10,6)
spreadsheetWrite(theSheet,theFile,"yes")
infoActiveCell=spreadsheetGetActiveCell(theSheet)
writeDump(infoActiveCell)
</cfscript>
<cfquery name="art" datasource="cfartgallery"> SELECT * FROM ART </cfquery> <cfscript> theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art.xls"; // create a spreadsheet object theSheet=spreadsheetNew("SampleData") // add rows from query spreadsheetAddRows(theSheet,art) // set active cell 1,6 spreadsheetSetActiveCell(theSheet,10,6) spreadsheetWrite(theSheet,theFile,"yes") infoActiveCell=spreadsheetGetActiveCell(theSheet) writeDump(infoActiveCell) </cfscript>