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

Hello Experts,

 

In my xlsx file I have this kind of data :

 

SASdevAnneMarie_0-1651221215927.png

When I do the proc import, I have this result :

SASdevAnneMarie_1-1651221259664.png

Do you know please, how to import the xlsx file in correcte way please to have the correct appearance of amount with % ?

 

Thank you !

1 ACCEPTED SOLUTION
5 REPLIES 5
Kurt_Bremser
Super User

The text in the first row forces the variable to be character, and the numbers are taken as raw values; since you also seem to have a numeric precision artifact in Excel, you get the funny representation.

 

Best remedy for such mixed data: save the file as csv, and read it with a data step where you can deal with "special" values.

 

What would you expect to get from the first row?

SASdevAnneMarie
Barite | Level 11
Thank you, Kurt.
I would like to have the same values as in my file in the data sas.
SASdevAnneMarie
Barite | Level 11
Thank you, Kurt !
GraphGuy
Meteorite | Level 14

Are you allowed to edit the Excel file?

If so, try creating an extra column, and add any "explanatory text" (such as "avec un mini de 50...") to that extra column. Once the numeric data column has only numeric data in it, it should be much easier for SAS to import.

 

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
  • 5 replies
  • 776 views
  • 3 likes
  • 3 in conversation