File is corrupted on save


#1

I am using v3.8.0.0. All I am trying to do is open an existing .xls and then saving it with a new name. When I try to open the new saved file MS Excel tells me that the file is corrupted.

Here is the code that I am using in C# (xls is attached):

Aspose.Cells.Excel xlApp = new Excel();

xlApp.Open(xlTemplateName, FileFormatType.Excel2003);

xlApp.Save(xlTempfileNewName,FileFormatType.Excel2003);

I have tried different file formats with no luck.


#2

I don’t find your attached file. Could you post it again? I will check it ASAP.


#3

Sorry about that. I was sick the past few days. Thanks.


#4

Here is the original file, 2005compliancetool.xls. The other file, TestProject2_42006.xls, which is attached above, is what gets saved and getting the error.


#5

Could you tell me the password to protect the worksheet and workbook? What happens if you remove vba/macros in your file?


#6

It is not my spreadsheet. It is provided by the State of Ohio and it must be returned to the state as is. The state releases a new version every year or two. The state just released a new version and it is working. I have attached it if you would like to compare. As far as the password goes, your guess is as good as mine. Thanks for the help!


#7

Do you mean if the password is removed, 2005compliancetool.xls works fine?