I need to do is to change the default sheet name "Sheet1" to another name, using the following sentence:
exportSettings.SheetName = "TestExport"
|
SheetName property is similar to ActiveSheet(i.e) only existing sheet name can be assigned to “ExcelExportOptions.SheetName”.
You can rename the worksheet by using the following code snippet
We have created sample to illustrate the above code snippet which is available for download in the following link.
Please try this sample and let us know if your requirement is fulfilled.
| |
I've tried to create the sheet using
exportSettings.Worksheet.Application.Worksheets.Create("TestExport")
and remove the default sheet using
exportSettings.Worksheet.Application.Worksheets.Remove("Sheet1")
without success.
|
We are unable to reproduce this issue in our end. The expected behavior of adding a new sheet and removing existing is working fine. If you still face this issue, we request you to share the issue reproducing sample which will be helpful for us to provide you a solution to you at the earliest. | |
I´ll be glad if you post some documentation on exportSettings.Worksheet functionality. |
ExcelExportOptions is a custom helper class used for exporting in our BookStoreApplication. Currently, we don’t have a documentation for the custom classes. You can make of these class in your project and let us know if you need any clarification in it. |