Exported file characters are mixed with "?"

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
faraon7
Posts: 1
Joined: Sat Oct 05, 2013 12:45 pm

Exported file characters are mixed with "?"

Post 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!
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Exported file characters are mixed with "?"

Post 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.
Lars Arvidsson, Axolot Data
auge
Posts: 1
Joined: Thu Mar 06, 2014 10:23 am

Re: Exported file characters are mixed with "?"

Post 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!
Post Reply