Whatever message this page gives is out now! Go check it out!
spreadsheetSetFitToPage(spreadSheetObject,fitToRange,pagesWidth,pagesHeight)Name | Required | Type | Description |
spreadSheetObject | Yes | ExcelInfo | The Excel spreadsheet object to fit to page for printing. |
fitToRange | Yes | Boolean | True, to enable fit to page. False, otherwise. |
pagesWidth | Yes | Integer | The number of pages to fit the sheet's columns. Specify 0 for no horizontal fit. |
pagesHeight | Yes | Integer | The number of pages to fit the sheet's rows. Specify 0 for no vertical fit. |
<cfscript>
theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "sheet-fit-page-off.xls";
// create a spreadsheet object
obj=spreadsheetNew("SheetNew",true)
// add data
for (i=1;i<52;i++){
SpreadsheetSetCellValue(obj,"Value1#i#",#i#,1)
SpreadsheetSetCellValue(obj,"Value2#i#",#i#,2)
SpreadsheetSetCellValue(obj,"Value3#i#",#i#,3)
SpreadsheetSetCellValue(obj,"Value4#i#",#i#,4)
SpreadsheetSetCellValue(obj,"Value5#i#",#i#,5)
}
spreadsheetSetFitToPage(obj,true,2,2)
spreadsheetWrite(obj, theFile, "", "yes", "no")
</cfscript><cfscript>
theFile=GetDirectoryFromPath(GetCurrentTemplatePath()) & "sheet-fit-page-off.xls";
// create a spreadsheet object
obj=spreadsheetNew("SheetNew",true)
// add data
for (i=1;i<52;i++){
SpreadsheetSetCellValue(obj,"Value1#i#",#i#,1)
SpreadsheetSetCellValue(obj,"Value2#i#",#i#,2)
SpreadsheetSetCellValue(obj,"Value3#i#",#i#,3)
SpreadsheetSetCellValue(obj,"Value4#i#",#i#,4)
SpreadsheetSetCellValue(obj,"Value5#i#",#i#,5)
}
spreadsheetSetFitToPage(obj,false,2,2)
spreadsheetWrite(obj, theFile, "", "yes", "no")
</cfscript>