I am using cells version 7 dll. While taking out the worksheets Gateway II and Gateway III of the attached file and saving them as separte files, we are getting thread abort exception. can you please investigate and provide the solution what is causing it and how to remedy it. Gateway I worksheet and saviing it as separte file works fine. Thank you.
I have attached the output file for your reference.
The code removes all the worksheets except the desired one.
Please also see the screenshot.
C#
string filePath = @“F:\Gateway±+Summary+Sheet.xls”;
Workbook workbook = new Workbook(filePath);
//Move the worksheet at index 0
Worksheet worksheet = workbook.Worksheets[“Gateway III”];
worksheet.Move(0);
//Remove all other worksheets
int idx = 0;
while (workbook.Worksheets.Count > 1)
{
workbook.Worksheets.RemoveAt(1);
}
//Save the workbook
workbook.Save(filePath + “.out.xls”);
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.