How do you create this file, Do you create this file from the scratch or from a template file. Could you paste you complete sample code here. So that we may check and figure out the issue soon.
Do you use template file to generate output file (bad_excel.xls)? Your code files involve your database so it does not make much sense and cannot be implemented. Could you give us more details about the problem with steps involved and create a simple console application (using your template file(if you use)) to show the issue and post us here. It will help us to sort out the things soon.
I am experiencing the same problem. I am using a template file as the master file with some VBA inside it.
The file generation works when I create the work book from scratch, however when I open the workbook up using the master(with VBA), add my data in, and then save it appears to be corrupt when opening it up in Excel(2003 SP2).
I have tried a number of methods to get around this, including the Copy() and Combine() methods on the Workbook object, although the API states that the Combine() method can only be used for Data and probably does not work for VBA macros. When using Copy() I get the same corrupted output.
Well, I tested your scenario a bit: I used a template file with some vba macros attached, opened it (workbook.Open), input some data and finally saved it to disk. I found no problem, I can open the output file in MS Excel 2000 - Excel 2007 without any problem. I also tested the template file in web Asp.Net application (VS.Net 2005 with .Net Framework 2.0 ) to open the generated file in OpenInExcel or save to disk and I found no issue.
Could you post your template file here, So that we may check and figure out the issue soon.
We do not use template file, and no VBA. We are trying to figure which statements cause the error or/and make a console application to help you to find out the problem.
Here are some clues that may be helpful:
This application is OK when we use ASPOSE.Cells V4.1.0.0./4.3.X except the Excel formula features and AutoFitRow(). Those 2 features are also on the fixed list of V4.4.0.0..
According to my test, the error is generated by the name.RefersTo. I have no idea what the format I should use for this property. Please give me a sample to show how to use it.
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.