XLS[0].AsString[1,1] := '25°/38°'
excel : 25?38?
why?
Garbled
Re: Garbled
Hello
Do you uses an unicode delphi (D2009+)? If not, any non-ascii characters (the degree char) will be probably be wrong.
Do you uses an unicode delphi (D2009+)? If not, any non-ascii characters (the degree char) will be probably be wrong.
Lars Arvidsson, Axolot Data
Re: Garbled
I USE Delphi2010
test:
open Delphi2010
new project
add TxlsReadWriteII5
in formcreate write code
procedure TForm1.FormCreate(Sender: TObject);
begin
xls[0].AsString[1, 1] := '±5 60°';
xls.SaveToFile('c:\aaa.xlsx');
end;
open c:\aaa.xlsx
garbled?
i garbled.
debug program
find problem in function
function TXc12DataSST.AddString(const AText: AxUCString): integer;
if IsUnicode(AText) then
P := MakeString(AText)
else
P := MakeCompressedString(AText);
this code , if IsUnicode(AText) then
is no unicode , run P := MakeCompressedString(AText);
mistaken
test:
open Delphi2010
new project
add TxlsReadWriteII5
in formcreate write code
procedure TForm1.FormCreate(Sender: TObject);
begin
xls[0].AsString[1, 1] := '±5 60°';
xls.SaveToFile('c:\aaa.xlsx');
end;
open c:\aaa.xlsx
garbled?
i garbled.
debug program
find problem in function
function TXc12DataSST.AddString(const AText: AxUCString): integer;
if IsUnicode(AText) then
P := MakeString(AText)
else
P := MakeCompressedString(AText);
this code , if IsUnicode(AText) then
is no unicode , run P := MakeCompressedString(AText);
mistaken
Re: Garbled
Hi
I'm running Delhpi 2007 and when using XLSReadWriteII 4 we can write Excel files with non ASCII characters. Using version 5 some of the non ASCII texts are collapsed, so the same text is used for multiple cells.
The problem is the hash table in function TXc12DataSST.AddString(AText: AxUCString): integer.
The following call returns the same index for different strings.
Result := FHashTable.ValueOf(AText);
if we call
function TXc12DataSST.FileAddString(const AText: AxUCString): integer;
instead of TXc12DataSST.AddString everything works.
Would it be possible for you to update the code with compile directives to call FileAddString when running Delphi 2007 and older?
Nicolas
I'm running Delhpi 2007 and when using XLSReadWriteII 4 we can write Excel files with non ASCII characters. Using version 5 some of the non ASCII texts are collapsed, so the same text is used for multiple cells.
The problem is the hash table in function TXc12DataSST.AddString(AText: AxUCString): integer.
The following call returns the same index for different strings.
Result := FHashTable.ValueOf(AText);
if we call
function TXc12DataSST.FileAddString(const AText: AxUCString): integer;
instead of TXc12DataSST.AddString everything works.
Would it be possible for you to update the code with compile directives to call FileAddString when running Delphi 2007 and older?
Nicolas
Re: Garbled
Hello
This is fixed in update 5.20.43
Don't use the suggested solution above. It has other consequences that make it a very bad idea.
This is fixed in update 5.20.43
Don't use the suggested solution above. It has other consequences that make it a very bad idea.
Lars Arvidsson, Axolot Data