Page 1 of 1

Cannot read XL2007 files and error E4006

Posted: Mon Nov 25, 2013 9:46 am
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

Re: Cannot read XL2007 files and error E4006

Posted: Mon Nov 25, 2013 4:59 pm
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?

Re: Cannot read XL2007 files and error E4006

Posted: Tue Nov 26, 2013 2:07 am
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?

Re: Cannot read XL2007 files and error E4006

Posted: Tue Nov 26, 2013 3:02 pm
by larsa
Hello

Formulas tab and Name Manager.

Re: Cannot read XL2007 files and error E4006

Posted: Wed Nov 27, 2013 2:22 am
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.

Re: Cannot read XL2007 files and error E4006

Posted: Wed Nov 27, 2013 1:51 pm
by larsa
Hello

This is fixed in update 5.20.09

Re: Cannot read XL2007 files and error E4006

Posted: Thu Nov 28, 2013 5:54 am
by BigMax
larsa wrote: This is fixed in update 5.20.09
still the same error :(
Error occurs during parsing formulas in the names.

Re: Cannot read XL2007 files and error E4006

Posted: Fri Nov 29, 2013 7:58 am
by larsa
Hello

I can not reproduce this. Tested with D7 as well.

Re: Cannot read XL2007 files and error E4006

Posted: Tue Dec 03, 2013 3:00 am
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.

Re: Cannot read XL2007 files and error E4006

Posted: Tue Dec 03, 2013 4:18 pm
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.