Whatever message this page gives is out now! Go check it out!
spreadsheetGetColumnWidth(spreadSheetObject,column,returnWidthInPixels)Name | Required | Type | Description |
spreadSheetObject | Yes | ExcelInfo | The Excel spreadsheet object in which to retrieve the width of the specified column. |
column | Yes | Integer | The column number whose width is to be retrieved. |
returnWidthInPixels | No | Boolean | True to return the width in number of pixels. If false, it will return width in points. |
<cfquery name="art" datasource="cfartgallery">
SELECT * FROM ART
</cfquery>
<cfscript>
theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art-col-width.xls";
// create a spreadsheet object
theSheet=spreadsheetNew("SampleData")
// add rows from the table to the spreadsheet
spreadsheetAddRows(theSheet,art)
// write the spreadsheet
spreadsheetWrite(theSheet,theFile,"yes")
// Whether to return the width in number of pixels.
// If false, it will return width in number of characters
// that can fit in column.
colWidth=spreadsheetGetColumnWidth(theSheet,3,"TRUE")
writeOutput(colWidth)
</cfscript><cfquery name="art" datasource="cfartgallery">
SELECT * FROM ART
</cfquery>
<cfscript>
theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "art-col-width.xls";
// create a spreadsheet object
theSheet=spreadsheetNew("SampleData")
// add rows from the table to the spreadsheet
spreadsheetAddRows(theSheet,art)
// write the spreadsheet
spreadsheetWrite(theSheet,theFile,"yes")
// Whether to return the width in number of pixels.
// If false, it will return width in number of characters
// that can fit in column.
colWidth=spreadsheetGetColumnWidth(theSheet,3,"FALSE")
writeOutput(colWidth)
</cfscript>