spreadsheetRemoveSheet

Deletes a spreadsheet.

spreadsheetRemoveSheet (spreadsheetObj, sheetname); → returns void

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

spreadsheetRemoveSheet Argument Reference

spreadsheetObj variableName
Required

The Excel spreadsheet object from which you delete the sheet.

sheetname string
Required

Name of the sheet that must be removed.

Examples
Sample code invoking the spreadsheetRemoveSheet function

<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