spreadsheetRemoveSheet

Deletes a spreadsheet.

spreadsheetRemoveSheet (spreadsheetObj, sheetname); → returns void

This function requires Adobe ColdFusion 9.0.1 and up. Not supported on Lucee, OpenBD, etc.

spreadsheetRemoveSheet Argument Reference

spreadsheetObj
Required

The Excel spreadsheet object from which you delete the sheet.

sheetname
Required

Name of the sheet that must be removed.

Examples sample code invoking the spreadsheetRemoveSheet function


Tag Syntax

<cfset spreadsheetVar= spreadsheetNew('New')> 
 <cfset spreadsheetCreateSheet(spreadsheetVar,'A')> 
 <cfset spreadsheetCreateSheet(spreadsheetVar,'B')> 
 <cfspreadsheet action='write' filename='#dirname#mySpreadSheet.xls'  name='spreadsheetVar' overwrite='true' > 
 <cfspreadsheet action='read' src='#dirname#mySpreadSheet.xls' name='spreadSheetVar' >     
 <cfset spreadsheetRemoveSheet(spreadsheetVar,'B')> 
 <cfspreadsheet action='write' filename='#dirname#mySpreadSheet.xls'  name='spreadsheetVar' overwrite='true' > 

Fork me on GitHub