Can't open doc saved as Excel2000 with Excel 2000

I have a doc that I’m saving as Excel2000, but when I try and open the doc in Excel 2000, it crashes Excel.

I’ve tried getting the latest cells dll and that didn’t work. I’m also using a template that was create with 2003, but I tried opening and saving the template with 2000, but that didn’t help either.

Is there something I’m doing wrong when saving as Excel2000?

The basic code for saving is this:

MemoryStream stream = new MemoryStream();
workbook.Save( stream, FileFormatType.Excel2000 );

Thanks.

Josh

Hi Josh,

Which version of Aspose.Cells are you using? Can you post your files here? We will check it ASAP. By the way, have you installed Excel2000 patches? Sometime MS patches can solve your problem.

I’m currently using aspose.cells 4.4.0.0. I’m trying out 4.4.1.0 right now but I don’t think it’ll make a difference.

I’m using Excel 2000 9.0.6926 SP-3.

I’ve added the created file and the template used to create it.

Here is the created file. It wouldn’t let me attach both at the same time.

Hi,

Please try this fix.We open and save it . It works fine.

Workbook workbook = new Workbook();

workbook.Open(@"F:\FileTemp\QuikTemplate.xls");

workbook.Save(@"F:\FileTemp\dest.xls");

This dll didn’t fix the problem. Excel still crashing when trying to open the created file.

Do you use the same code and sample file as Warren’s? Can you zip and post your sample file, code and output file here? We will check it ASAP.

Hi,

We find this issue too after checking this file with Excel 2000.

We could not fix this issue soon. There are some VBA codes in your template file. There are some relation between file and VBA codes.We do not know VBA struct and only keep them and some.

I think you must delete a worksheet and add a worksheet. We do not change the VBA codes if you delete a worksheet. So it cause this error. Please only change the sheet name not not delete the worksheet if your file contains VBA codes.

Here is some sample code that reproduces the bad file.

Hi,

Thanks for your codes.

This error is caused by the operations listed in "120950 in reply to 120945".

If there are VBA codes in the template file, please do not remove the worksheet.

If you do not want to display the worksheet, please hide it with the code "Worksheet.IsVisible = false;"