- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I am trying to import Excel file using 2 different program and also tried using SAS import wizard but non of them help me out :
Program 1:
proc import datafile="W:\auto\Trial.xlsx"
out = T dbms = xlsx ;
sheet="TI";
getnames=yes;
run;
gives all observation but warning message in log :
WARNING: Some character data was lost during transcoding in column: IETEST at obs 3.
Program 2:
libname sur pcfiles path="W:\auto\Trial.xlsx" ;
data ag;
set sur.'Ti$'n;
run;
Both of the program are not able to read "β" (Beta-symbol) and superscript number come to base.
Can you please help me to deal with importing "xlsx" without changing special character.
Sample excel data
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for replay. Trying 'getnames=no' just changed Variable name. Do you bring data text manually or programaticaly, if yes can you share program or give some hint.
Even I tried using SAS import wizard but it is also not helping me out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
https://communities.sas.com/t5/SAS-Programming/Import-data-from-MS-access-Excel-while-retaining-spec...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@surajmetha55 wrote:Dear all,
I am trying to import Excel file using 2 different program and also tried using SAS import wizard but non of them help me out :
Program 1:
proc import datafile="W:\auto\Trial.xlsx" out = T dbms = xlsx ; sheet="TI"; getnames=yes; run;
gives all observation but warning message in log :
WARNING: Some character data was lost during transcoding in column: IETEST at obs 3.
Program 2:
libname sur pcfiles path="W:\auto\Trial.xlsx" ; data ag; set sur.'Ti$'n; run;
Both of the program are not able to read "β" (Beta-symbol) and superscript number come to base.
Can you please help me to deal with importing "xlsx" without changing special character.
Sample excel data
You might try changing your SAS session encoding to UTF-8. If your SAS session encoding is already UTF-8 then I'm not sure why you are having the issue unless proc import is somehow treating the file as having Latin encoding.