Whatever message this page gives is out now! Go check it out!
spreadsheetClearCell(spreadSheetObject,row,column)Name | Required | Type | Description |
spreadSheetObject | Yes | ExcelInfo | The Excel spreadsheet object from which to clear the specified cell. |
row | Yes | Integer | The row number of the cell to be cleared. |
column | Yes | Integer | The column number of the cell to be cleared. |
<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)
// Define the structure for formatting a cell
myFormat=StructNew();
myFormat.color="blue";
myFormat.bold="true";
myFormat.underline="true";
myFormat.alignment="center";
myFormat.rotation=45;
myFormat.italic="true"
// Set formatting to cell (10,5)
SpreadsheetFormatCell(theSheet,myFormat,10,4)
// clear the format
spreadsheetClearCell(theSheet,10,4)
spreadsheetWrite(theSheet,theFile,"yes")
</cfscript>