Dear Sir / Madam,
I installed SAS 9.4, but can not import data from excel. there are 2 problems.
1) Failed to transcode data from UTF-16LE to wlatin1
I tried to follow the previous problems in these articles, but can find solutions.
2) Missing microsoft office component.
And I tried to save the excel in a xlsx with the only data sheet in it, but it shows missing microsoft office component.
Finally, I solve this problem with this:
1. Close EG
2. Go to D:\Program Files\SAS Home\SAS Foundation\ 9.4
3. Open the sasv9.cfg file in notepad
4. Comment out this line:
/*-config "D:\Program Files\SAS Home\SASFoundation\9.4\nls\en\sasv9.cfg" */
5. Add this line
-config "D:\Program Files\SAS Home\SASFoundation\9.4\nls\u8\sasv9.cfg"
6. Save the file.
Open EG and test.
I thought it might because I didn't choose utf-8 as default, thank you.
Hello @Daisyliang,
what maintenance of SAS 9.4 do you have installed? Besides, I think you should check if your EG and Office bit-ness are 32-bit or 64-bit. Both must be at the same level. Also please check, as the second window suggest, if you have all the ACE components installed and on the proper version.
http://support.sas.com/resources/papers/proceedings16/10863-2016.pdf
Also, if your Office document it is saved with UTF-8/UNICODE/Double-byte characters, and your SAS Session is on single byte (wlatin) it won't be able to translate/transcode. You would need to have a workspace server session on UTF-8/UNICODE level.
I also have seen when an Excel file,s aved on certain ways, it contains on the first lines a "Korean" blah-blah string, if removed, it works. Of course, that is not something you can do for every Excel file, hence, to apply the latest hotfixes or maintenance, it is very recommended.
If nothing of this works, I would recommend you to contact SAS Technical Support.
Thx for your kindly reply, for question 2) I find out that it's because the version of my office is 32bit, and now I reinstalled a 64bit version, the problem solved.
But for question 1, I still don't have any idea of what to do, because I'm a new learner of SAS, no experiences in coding. The SAS 9.4 is the newest I suppose, becasue I just installed and uploaded it. Is it because when I installed it, I didn't choose utf-8 as a default option? should I just reinstall it with utf-8?
Regards.
Finally, I solve this problem with this:
1. Close EG
2. Go to D:\Program Files\SAS Home\SAS Foundation\ 9.4
3. Open the sasv9.cfg file in notepad
4. Comment out this line:
/*-config "D:\Program Files\SAS Home\SASFoundation\9.4\nls\en\sasv9.cfg" */
5. Add this line
-config "D:\Program Files\SAS Home\SASFoundation\9.4\nls\u8\sasv9.cfg"
6. Save the file.
Open EG and test.
I thought it might because I didn't choose utf-8 as default, thank you.
Make sure SAS runs with correct encoding (as @JuanS_OCS already recommended)
To avoid hassles with MS-installed (or not-installed) modules, copy your files to the SAS server and run a straight proc import there. SAS 9.4 can read/write xlsx directly on any platform.
Best option: use a sensible, text-based file format for data transfers between applications. Save to csv from Excel, and import that, or read with a custom data step. Similarly, write to csv from SAS, and use that in Excel.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.