BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Daisyliang
Fluorite | Level 6

 

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. 

https://communities.sas.com/t5/Base-SAS-Programming/Failed-to-transcode-data-from-UTF-16LE-to-wlatin...

https://communities.sas.com/t5/SAS-Enterprise-Guide/Transcode-data-from-utf16le-to-wlatin1-issue/td-...

 

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.

 

6f0360c6d901b109cffaccc84e699a2.png

 

 

921aeea7c65b37a635331cda40e312e.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Daisyliang
Fluorite | Level 6

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.

 

 

View solution in original post

4 REPLIES 4
JuanS_OCS
Amethyst | Level 16

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

https://communities.sas.com/t5/Administration-and-Deployment/64-bit-Microsoft-ACE-drive-supported-on...

 

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.

Daisyliang
Fluorite | Level 6

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.

Daisyliang
Fluorite | Level 6

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.

 

 

Kurt_Bremser
Super User

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 8996 views
  • 1 like
  • 3 in conversation