Cannot read XL2007 files and error E4006

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
BigMax
Posts: 5
Joined: Mon Nov 25, 2013 9:25 am

Cannot read XL2007 files and error E4006

Post by BigMax »

Hello!
Promlem - Error opening file:
"E4006: Error in formula".
But in the file are not formulas.

Version: 5.20.08

file:
https://drive.google.com/file/d/0B_KCuP ... sp=sharing
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Cannot read XL2007 files and error E4006

Post by larsa »

Hello

Names are formulas and there are three names in your file.

I could not reproduce the error, the file is read fine here.
What is your values of ListSeparator and DecimalSeparator?
Lars Arvidsson, Axolot Data
BigMax
Posts: 5
Joined: Mon Nov 25, 2013 9:25 am

Re: Cannot read XL2007 files and error E4006

Post by BigMax »

Code: Select all

ListSeparator=';'
DecimalSeparator=','
Version Delphi - 7.0

About the names of the formulas I not understand - on sheets of formulas nowhere. Where they are in the file?
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Cannot read XL2007 files and error E4006

Post by larsa »

Hello

Formulas tab and Name Manager.
Lars Arvidsson, Axolot Data
BigMax
Posts: 5
Joined: Mon Nov 25, 2013 9:25 am

Re: Cannot read XL2007 files and error E4006

Post by BigMax »

Hello!
Thanks for Name Manager
Error out because using russian letters in sheets names (column 'Refers To' in Name Manager). After replacing names of sheets on english letters - error disappeared.

In formulas on the sheets I checked - no errors because of using russian letters.

Please, correct this bag.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Cannot read XL2007 files and error E4006

Post by larsa »

Hello

This is fixed in update 5.20.09
Lars Arvidsson, Axolot Data
BigMax
Posts: 5
Joined: Mon Nov 25, 2013 9:25 am

Re: Cannot read XL2007 files and error E4006

Post by BigMax »

larsa wrote: This is fixed in update 5.20.09
still the same error :(
Error occurs during parsing formulas in the names.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Cannot read XL2007 files and error E4006

Post by larsa »

Hello

I can not reproduce this. Tested with D7 as well.
Lars Arvidsson, Axolot Data
BigMax
Posts: 5
Joined: Mon Nov 25, 2013 9:25 am

Re: Cannot read XL2007 files and error E4006

Post by BigMax »

Understood :(
I blocked reading the names in the source of components.

Another problem with Delphi7:
when reading data from an empty cell and convert to a string is not correct processed value varNull, example:

Code: Select all

  mValue:=XLS.Sheets[0].AsVariant[0,1000];
  mStr:=VarToStr(mValue);
if mValue=varNull, function VarToStr works incorrect and returns '1' instead ''.
In the 4th version this problem was not.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Cannot read XL2007 files and error E4006

Post by larsa »

Hello

The VarToStr function is a part of Delphi RTL (Variants unit). If you have problems with that function, please address your questions to Embarcadero.
Lars Arvidsson, Axolot Data
Post Reply