Hi Aspose Support Team,
I am currently using Aspose.Cell.dll version 4.7.1.24 to format excel files. One of the formatting requires deletion of a specific column (example Column M). However I am unable to achieve this and while opening the formatted file it is giving the error: Error found unreadable content in ‘Book1_formatted_4.8.0.0.xls’. Do you want to recover the contents of this workbook? if you trust the source of workbook, click Yes
Clicking Yes, opens the file but again following message is displayed: Excel was unable to open the file by repairing or removing the unreadable content (please refer the screen shot DeleteColumn_Issue.jpg attached herewith).
I downloaded the latest version 4.8.0.0 of the Aspose.Cells.dll. however it does not solve the issue.
Earlier I was using the version 4.7.1.0 of Aspose.Cells.dll, I tried with it and seems that formatting is happening properly with version 4.7.1.0 and there are no errors encountered.
Code used:
WorkBook.Open(@"C:\Book1.xlsx", FileFormatType.Excel2007Xlsx);
foreach (Worksheet ws in WorkBook.Worksheets)
{
switch (ws.Index)
{
case 0:
{
ws.Cells.DeleteColumn(12); //Delete Column M
break;
}
}
}
WorkBook.Save(@"C:\Book1_Formatted_4.8.0.0.xlsx", Aspose.Cells.FileFormatType.Excel2007Xlsx);
Also the formatted files for each version are attached herewith. Requesting you to please provide you feedback on the above mentioned issue.
Thanks & Regards,
Abhishek Bhatt