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

spreadsheetGetCellType

Last update:
May 18, 2026

Description

Retrieves the data type of a specified cell in a spreadsheet.

Returns

A string with one of the following values- BLANK, BOOLEAN, ERROR, FORMULA, NUMERIC, or STRING.

History

  • ColdFusion (2025 release): Added the function.

Syntax

spreadsheetGetCellType(spreadsheetObject,row,column)

Parameters

Name
Required
Type
Description
spreadSheetObject
Yes
ExcelInfo
The Excel spreadsheet object for which to get the cell type.
row
Yes
Integer
The row number of the cell.
column
Yes
Integer
The column number of the cell.

Example

<cfquery name="art" datasource="art">
    SELECT * FROM ART
</cfquery>
<cfscript>
    theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art.xls";
    // create a spreadsheet object
    theSheet=spreadsheetNew("SampleData")
    // add rows from query
    spreadsheetAddRows(theSheet,art)
   // writeOutput(theFile)
    spreadsheetWrite(theSheet,theFile,"yes")
    // get cell type
    cellType=spreadsheetGetCellType(theSheet,1,4)
    writeOutput(cellType)
</cfscript>

Output

STRING
The script adds rows from a query result into a spreadsheet. Then the spreadsheetGetCellType function retrieves the data type of the specified cell, referenced by row and column.

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