hello all,
do you know why I read the English character into SAS but shown as Chinese character?
I use the following code,
proc import datafile = "G:\Raw_data\SIC_Code\SIC_CODE_LIST.xlsx" OUT=SIC_CODE_LIST DBMS=XLSX replace; Sheet='Sheet1'; RANGE='A1:A1421'; GETNAMES=YES; RUN;
to read the following table,
des |
Industry Group 011: Cash Grains |
0111 Wheat |
0112 Rice |
0115 Corn |
0116 Soybeans |
0119 Cash Grains, Not Elsewhere Classified |
Industry Group 013: Field Crops, Except Cash Grains |
0131 Cotton |
the result shows as below,
but when I click on the text, it is still English character.
Do you know why, and how could I fix it? I would appreciate it if you could give me some advice.
many thanks in advance.
What encoding if your SAS session using? Check the macro variable SYSENCODING.
What encoding is the XLSX file using? I have no idea how to check that.
Can you save the XLSX file as a delimited text file instead? Then you could set the encoding of the text file in the INFILE statement you use when reading the text into SAS.
What encoding if your SAS session using? Check the macro variable SYSENCODING.
What encoding is the XLSX file using? I have no idea how to check that.
Can you save the XLSX file as a delimited text file instead? Then you could set the encoding of the text file in the INFILE statement you use when reading the text into SAS.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.