Page 1 of 1

Exported file characters are mixed with "?"

Posted: Sat Oct 05, 2013 1:00 pm
by faraon7
Hi we are using version 4 of the component because i bought it before some time. And i have a lot of code with ver.4 in XE3 which work ok.
We migrated to XE4 and now we have troubles with strange characters on the exported excel file.
For instance i use following code:

Code: Select all

xls.Sheet[0].AsString[1,0] := "Counting1";
xls.Sheet[0].AsWideString[1,0] := "Counting2";
xls.Password := "some pass";
xls.FileName = "FNAME":
xls.Write();  
The strings "Counting1", "Counting2" in the exported file are writed as following:
1. C?o?un?t?in?g?1
2. C?o?un?t?in?g?2

I tried with C++ Builder, but result is the same. We tried with Coverting stigns to widechar,utf8,String, ByteArray but the result is the same exept "?" is placed in different places. We tried also with trial version of XLSReadWrite 5 , but there file password encrypting doesn`t work and we have to change a lot of code.
So we will be grateful for any help...?!
Best Regards!

Re: Exported file characters are mixed with "?"

Posted: Wed Oct 09, 2013 6:22 am
by larsa
Hello

I have no idea what might cause this. My best guess is that your strings somehow is coded in the wrong way, that is, not unicode or ansi.

Re: Exported file characters are mixed with "?"

Posted: Thu Mar 06, 2014 10:31 am
by auge
I have the same problem. When upgrading to XE4 the strings in the Excel file are mixed with "0". With XE3 everything works fine (XLSReadWriteII4).
(Strings are not coded in any other way than before)
Have you found any solutions, workarounds.....?
Best regards!