BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Kendrew
Calcite | Level 5
I was working on a task and just wanted to import a xlsx file.

The code is just a normal proc import step as below.

Proc import datafile = “//path” out=“want” dbms=xlsx replaces;
run;

Say there is a column (rating) and contains some varibles like “4B”, “1A”, “3C” etc.
But after running the code, It shows as “_x0034_B”, “_x0031_A”, “_x0033_C”, and this also happens on other character format columns.

And this issue only exists on a single xlsx file, all other files are worked as usual.

I was wondering if there is any error on the specific file.

Please help, many thanks.
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

If there are any notes in the LOG about "encoding" it is a good idea to copy those notes and share them on the forum.

 

As a personal opinion, there is no such thing as a "normal" import of XLSX files. There is so much garbage that can occur if the files are ever manually edited that way too many of them have challenges.

 

An alternative might be to do a Save AS CSV file format and try importing that file.

View solution in original post

1 REPLY 1
ballardw
Super User

If there are any notes in the LOG about "encoding" it is a good idea to copy those notes and share them on the forum.

 

As a personal opinion, there is no such thing as a "normal" import of XLSX files. There is so much garbage that can occur if the files are ever manually edited that way too many of them have challenges.

 

An alternative might be to do a Save AS CSV file format and try importing that file.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

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
  • 1 reply
  • 926 views
  • 0 likes
  • 2 in conversation