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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1306 views
  • 0 likes
  • 2 in conversation