Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

Incorrect Excel File, correct PDF and other file formats - Work around.

edited October 2009 in Devices
Hello People,

I did some debuging by myselft and on the TxAll.pas file

Search for the expression "AutoConvertToNumber" it will occour just one on
the entire file.

I did the following changes around line 3217.

if (Txt.DataType in [rdtInteger, rdtFloat]) or (not Txt.IsMemo and
IsNumber(Txt.Text, FOptions.FormatChars) and FOptions.AutoConvertToNumber)
then
begin
if Trim(Txt.Text) <> '' then
begin

Comment Line // Stream(AnsiChar(3) + AnsiChar(2) + LotWord(14) +
LotWord(FRow) + LotWord(FCol) + XFIndex(Txt, True) + TextToIEEE(Txt.Text));
Add Line Text := Txt.Text;
Add Line Stream(AnsiChar(4) + AnsiChar(2) +
LotWord(Length(Text) + 8) + LotWord(FRow) + LotWord(FCol) + XFIndex(Txt,
False) + LotWord(Length(Text)) + Text);

end;

I can get my excel files ok now.
I hope It can help the communit .

Abel F. de Angelis
abel@afa.inf.br

Comments

  • edited March 2010
    Hello
    we have been having all the same issues,
    while solution below is great for data accuracy, however it converts numbers
    into text;
    in Excel user will have to convert them to numbers.

    I think I found a bug in that same unit TxAll.pas
    in the function below I changed Char to AnsiChar
    and it works for us.
    thought I share:

    function FloatToIEEE(Value: Double): String;
    var
    T: IEEES;
    I: Integer;
    begin
    T := IEEES(Value);
    Result := '';
    for I := 1 to 8 do begin
    Result := Result + AnsiChar(T[I]);
    end;
    end;

    Regards,
    Alina

This discussion has been closed.