Cell Comment handling when reading xls files

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
jyl
Posts: 5
Joined: Mon Nov 16, 2015 4:38 am

Cell Comment handling when reading xls files

Post by jyl »

Hi,

We came across an issue where cell comment may not be handled properly when XLSReadWriteII 4/5 reads an xls file, and this may also be related to memory management.

To be more specific, we had 2 exactly same error cases where our clients complained that our program cannot read particular xls files and hang forever. We stepped into the code in cases of reading those xls files, and observed following exceptions:

1. Initial Exception: "Expected reocrd missing: TXO"
2. The 2nd Exception prepended extra message: "Error on reading shape #1 Expected reocrd missing: TXO"
3. The last Exception again prepended extra message : "Error on reading record #86, 00EC Offs: 00002951 Error on reading shape #1 Expected reocrd missing: TXO"

After this, our program hung and the control was never returned to our code of handling the exception (i.e., the try...except block wrapping the XLSReadWrite.Read statement), and Access Violation can happen at any stage of this process.

When debugging, some code gave us a hint that the cell comment could be the reason of causing this issue, and we did find cell comments in our xls files! Removing those cell comments did successfully prevent our program from hanging and our program was able to handle the exceptions raised by XLSReadWriteII, but we detected some memory leaks from XLSReadWriteII at the end.

We are using version 4 in our program, and this is the first time we have had issue with reading xls files using XLSReadWriteII. Both xls files from our clients can be opened normally without any observable error, and re-saving them does not make any difference.

We then tried to use version 5 by creating a brand new Delphi project (VCL Forms Application) with a button click invoking XLSReadWrite.Read, and we created an xls file with content in only one cell together with cell comment. All exceptions above happened again.

We would be appreciated if you could help us look into this issue.

Thanks,
Justin
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Cell Comment handling when reading xls files

Post by larsa »

Hello

Please send me an excel file that causes this error.
Lars Arvidsson, Axolot Data
jyl
Posts: 5
Joined: Mon Nov 16, 2015 4:38 am

Re: Cell Comment handling when reading xls files

Post by jyl »

larsa wrote:Hello

Please send me an excel file that causes this error.
Hi Larsa,

I've sent a sample xls file to the support email address (xxx@yyy.zzz) mentioned on the website. Please have a look at it. I couldn't find any place in the forum to upload the file.

Thanks,
Justin
jyl
Posts: 5
Joined: Mon Nov 16, 2015 4:38 am

Re: Cell Comment handling when reading xls files

Post by jyl »

larsa wrote:Hello

Please send me an excel file that causes this error.

Hi Larsa,

Have you received the sample file and got time to look at it?

Justin
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Cell Comment handling when reading xls files

Post by larsa »

Hello

An update that fixes this problem will be posted by the end of this week.
Lars Arvidsson, Axolot Data
jyl
Posts: 5
Joined: Mon Nov 16, 2015 4:38 am

Re: Cell Comment handling when reading xls files

Post by jyl »

larsa wrote:Hello

An update that fixes this problem will be posted by the end of this week.
Thanks Larsa. Looking forward to the update.

Justin
jyl
Posts: 5
Joined: Mon Nov 16, 2015 4:38 am

Re: Cell Comment handling when reading xls files

Post by jyl »

larsa wrote:Hello

An update that fixes this problem will be posted by the end of this week.
Hi Larsa,

Would you mind notifying me when you post the update including the fix? The latest update for now is 5.20.64, which I don't think is the one including the fix.

Many thanks.

Justin
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Cell Comment handling when reading xls files

Post by larsa »

Hello

This is fixed in update 5.20.65
Lars Arvidsson, Axolot Data
Post Reply