Page 1 of 1

saving with .xls extension

Posted: Wed Mar 06, 2013 12:10 pm
by andrea.m86
Hi,
i'm trying to saving a file in compatibility with Excel97.
I have setted the version property as xvExcel97 but if i save the file with the extension .xls it seems corrupted and i can't open it.
If i save it with .xlsx as extension, everything works fine but, it's not the correct extension for excel 97.
what can i do?
Thanks.
Andrea

Re: saving with .xls extension

Posted: Wed Mar 06, 2013 1:05 pm
by andrea.m86
also reading from .xls files gives errors!

Re: saving with .xls extension

Posted: Wed Mar 06, 2013 2:49 pm
by larsa
Hello

I need more details in order to check this, such as the xls file that causes the problem.

Re: saving with .xls extension

Posted: Wed Mar 06, 2013 3:25 pm
by andrea.m86
This is an example of a file that i can't read
www.mediafire.com/?vomo48d66wjj36f

Re: saving with .xls extension

Posted: Thu Mar 07, 2013 9:38 am
by larsa
Hello

The file is invalid. You can't even open it with Excel.

Re: saving with .xls extension

Posted: Thu Mar 07, 2013 10:24 am
by andrea.m86
i'm sorry!
that was the file i've exported with xvExcel97 as .xls and infact it's corrupted (to open it you should manually change its extension from .xls to .xlsx).
Let's put some order:
- www.mediafire.com/?9hi61y15r6d7fsq :bad file exported as xvExcel97 .xls
- www.mediafire.com/?lu6gizr9ikcgesi :file .xls that i can't read.
thanks!

Re: saving with .xls extension

Posted: Thu Mar 07, 2013 8:19 pm
by larsa
Hello

1. How did you create the first file?

2. What error message did you receive when you tried to read the second file?

Re: saving with .xls extension

Posted: Fri Mar 08, 2013 8:45 am
by andrea.m86
hi,
first of all, i've to say that i'm using code written for XLSRedWriteII4.
With the previous version everything was ok, now i've performed some changes to the code to make it compatible with the new version but i have these problems.
about your questions:
1. The first file was created with XLSRedWriteII with the property xvExcel97. I'm trying to save it as .xls, therefore i set the filename property as aaa.xls. When you write it everything seems ok and the program doesn't give me any error. But I can not open the file generated unless i manually change the extension from .xls to .xlsx. If i do so the file opens correctly and i find all my datas.
2. The problems seems to be the lastrow property that is always -1 in xvExcel97 when reading an .xls file. That makes my program raise some errors.