Unable to open output file in Excel 2000

Hello,

I use Aspose.Excel 2.7.1 to create excel files with many worksheets in them. A typical file may have 150-200 worksheets. My customer generated a file with 400+ worksheets and is unable to open the output file in Excel 2000.

I also tried to open the file in Excel 2003 and it opens but generates a repair log with the following text in it...
------------------------------------
Microsoft Excel File Repair Log

Errors were detected in file 'D:\1.xls'
The following is a list of repairs:

Removed one or more invalid names.
------------------------------------
I also installed the latest version (2.9.2) and it gives me a duplicate Print_Area popup prior to opening the file and creating a repair log.

A designer file is used which contains 11 sheets. Each sheet is copied 0+ times depending on user selected options and then saved to an output file.

Any ideas what is happening with the larger files?

Thank you,
myeagy

Could you please send me the designer file and the generated file? And if possible, also please send me the sample code. I will check them ASAP.

Laurence,

I emailed you the designer and output files. When I open the output file the following repair log is generated in Excel 2002…
-------------------------------------------------
Microsoft Excel File Repair Log

Errors were detected in file ‘D:\WebContent\ABMS210\reports\ExcelExhibitBuilder_127555818500325280.xls’
The following is a list of repairs:

Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values,

but some data may have been lost or corrupted.
------------------------------------------------

Actually you can directly post your attachments over here. More info please check https://forum.aspose.com/t/2549.

Laurence, please encourage customers to report attachments over the forums since that would make you and customers easier.

I got your files. Now I am checking them. Thanks for your patience.

Could you please try to see if the following code works fine in your machine?
Excel excel = new Excel();

excel.Open("d:\\test\\Exhibits.xls");

Excel excel2 = new Excel();

for( int i = 0; i < excel.Worksheets.Count; i ++)
{
excel2.WorksheetsIdea.Copy(excel.WorksheetsIdea);
if(i != excel.Worksheets.Count - 1)
excel2.Worksheets.Add();
}

for( int j = 0; j < 40; j ++)
{
for( int i = 0; i < excel.Worksheets.Count; i ++)
{
excel2.Worksheets.Add();
excel2.Worksheets[i + (j + 1)* excel.Worksheets.Count].Copy(excel.WorksheetsIdea);
}
}


And do you set any formulas in your file?

Laurence,

When I run the code using 2.7.1 I get the following error…
-------------------
An unhandled exception of type ‘System.Exception’ occurred in aspose.excel.dll

Additional information: The same worksheet name already exists
-------------------

When I run the code using 2.9.2 it generates the attached file. I don’t use any formulas.


Could you post some sample code here? I don't need the exact code for data manipulation. I only want the code about coping worksheet, removing worksheet, adding worksheet and other worksheet related operations. Thank you very much.

Laurence,

I’ve attached a couple of source files.

I use one generator class per designer file worksheet (I attached one). I also attached the main driver class.

Please try this attached new hotfix v2.9.2.2.

Laurence,

I tried the code you provided above with the 2.9.2.2 hotfix and I get a popup when I try to open the file in Excel 2002…
-----------------------------
Name Conflict
Name cannot be the same as built-in name.
Old name: Print_Area
New name: [input box]
[OK] [Cancel]

Any idea why this popup comes up? I’ve seen it each time I generate a file with 2.9.2 and try to open the file. I’ve attached the output file.

I’ll also try the patch with my code and let you know what happens.

Thanks for all your help to date.

Laurence,

I’m now able to open my generated file (413 sheets) but I get the Print_Area prompt mentioned above.

I opened your file but didn't find any problems. I used Excel2003, ExcelXP and Excel97 to open it.

Could you please attach your screenshot for this problem? And could you please attach the file created with you code using v2.9.2.2?

Thank you.

Laurence,

Here is the message…


Laurence,

Here is the file…

I opened you file without any problem.

Is your Excel English version? Do you open the file after saving it to disk?

Laurence,

I always save the file to disk.

I get the pop up if I double click to open the file from explorer or if I first open Excel & then do a file->open.

We use the English version of Excel.
My version is Excel 2002 (10.6501.6714) SP3
My customers use Excel 2000 SP3


Thanks for all your help.

Hi Mike,

We opened ExhibitsOut_2.9.2.2.xls in several machines and didn’t find any problem.

We use Excel2002 SP1, English version.

I will instigate more on this issue.

Laurence,

I also had my supervisor try to open the file using Excel 2000 SR-1 first and then SP3 and he encountered the same popup.



When you use Excel2000 SR-1 to open it, you also meet this problem? I will update my Excel to SP3 and see what will happen.