ColdFusion 9.0 Resources |
SpreadsheetWriteDescriptionWrites single sheet to a new XLS file from a ColdFusion spreadsheet object. CategoryMicrosoft Office Integration Function syntaxSpreadSheetWrite(SpreadsheetObj, fileName) SpreadSheetWrite(SpreadsheetObj, fileName [,overwrite]) SpreadSheetWrite(SpreadsheetObj, fileName [, password]) SpreadSheetWrite(SpreadsheetObj, fileName [, password,overwrite]) See alsoSpreadsheetRead, SpreadsheetAddRow, SpreadsheetAddRows, SpreadsheetDeleteRow, SpreadsheetDeleteRows, SpreadsheetFormatRow, SpreadsheetFormatRows, SpreadsheetShiftColumns HistoryColdFusion 9: Added the function. Parameters
UsageUse this function to:
Example<cfscript> spreadsheet = SpreadSheetRead("C:\Files\Report.xls","Annual Report"); SpreadSheetWrite(spreadsheet,"C:\Files\Report.xls","P@ssword","yes"); </cfscript> Example 2 <cfscript> spObj = spreadsheetread("#dirname#SingleSheet.xls","Sheet2"); spreadsheetCreateSheet(spObj,"A"); spreadsheetaddrow(spObj,"x,x,x,x,x",3,1); spreadsheetsetActiveSheet(spObj,"A"); spreadsheetaddrow(spObj,"z,z,z,z,z",3,1); spreadsheetsetActiveSheetNumber(spObj,1); spreadsheetaddrow(spObj,"a,b,c,d,e",3,1); SpreadsheetWrite(spObj,"#dirname#SingleSheet1.xls","yes"); </cfscript> |