cancel
Showing results for 
Search instead for 
Did you mean: 

Chinese Letter displaying as ??

Occasional Contributor

Chinese Letter displaying as ??

Am testing Web page which is in chinese Language test data is in Excel Cell am pulling the testdate in variable and trying to using it in java script  now when is pick the Excel data which is a chinese letter it shows in ?? in the variable

how to display the letter as it is in excel below are the code i used 

 

var Temp=VarToString(excelMainSheet_TestCase.Cells.Item(i,9));
Log.Message(Temp)

 

Temp it shows as ?? mark

 

 

 

3 REPLIES 3
Community Hero

Re: Chinese Letter displaying as ??

I googled and come with some sort of idea,

 

I hope you are doing ADODB to get data, you can try the following.

 

Edward

Very many thanks for taking the time and solving this problem.

I did not fully understand your description however my connection string

sconnect = "Provider=MSDASQL.1;DSN=Excel Files;DBQ=" & SpreadSheetName & ";HDR=Yes';"

read chinese characters as ????, whereas your connection string:

sconnect = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & SpreadSheetName & "';" & "Extended Properties=""Excel 12.0;HDR=YES;IMEX=1;"";"
 read them as 北京, 中国 (even in the VBA code)
Thats a great result, thanks again.

 


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

Occasional Contributor

Re: Chinese Letter displaying as ??

Ho it was simple solution i when fectching the data i converted it to VarToString

but when i removed it is working

 

var Temp=VarToString(excelMainSheet_TestCase.Cells.Item(i,9));
Log.Message(Temp)

 

Working fine

var Temp=(excelMainSheet_TestCase.Cells.Item(i,9));
Log.Message(Temp)

Occasional Contributor

Re: Chinese Letter displaying as ??

nantri Shankar 

New Here?
Join us and watch the welcome video:
Top Kudoed Authors