I have an issue if i try to save a foldername with chinese characters to an xlsx file.
The reproduction is a bit tricky, since
I cannot reproduce this with a hardcoded string but only with a folder which contains chinese characters.
You can download the sample folder here:
http://www.file-upload.net/download-803 ... r.zip.html
To reproduce the issue please extract the testolder.zip e.g. to an empty usb stick.
Use the code below (please adjust the drivename of the usb stick in the code below).
FindFirst will return a TSearchRec record with the name of the folder which I try to write
as string into an xlsx file:
Sample code:
Code: Select all
var
ExcelFile5 : TXLSReadWriteII5;
lstring: TSearchRec;
begin
FindFirst('F:\␍簴ꊨ簷*', faAnyFile, lstring); <- adjust the drivename of the usb stick here
ExcelFile5 := TXLSReadWriteII5.Create(nil);
ExcelFile5.Version:= xvExcel97;
ExcelFile5.Filename := 'D:\output.xlsx';
ExcelFile5[0].AsString[0,0] := lstring.Name;
ExcelFile5.Write;
Thank you.