Steps of code:
- Starting with a version 2003 .XLS template file containing multiple sheets having autofilter enabled
- populate data into multiple sheets
- remove unused sheets from workbook using Worksheets.RemoveAt(“Pending Jobs”)
- save as version2003 using Save(FileName, FileFormatType.Excel2003)
“Naming Conflict” error message pop-up from Excel 2007 forces user to rename “_FilterDatabase” to something else. “_FilterDatabase” appears to be the name of the range of autofiltered cells in the resulting workbook. But this name is not used in the source template workbook.
The .XLS workbook with removed sheet(s) may be opened in Excel 2003 without issue.
If I save as a .XLSX workbook (FileFormatType.Excel2007Xlsx) there is no error opening in Excel 2007 with the removed sheets.
Is there another method I should be using to remove these sheets?