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

Hello Folks,

 

I am trying to check with you to see if there is way I can read an Excel file (.xlsx) in SAS containing few columns with superscripts in the values. Attached is just a sample file containing a single column with some superscript values. I would like the superscripts to be retained when outputting to an Excel or PDF.

 

I  tried  PROC IMPORT, DBMS=XLSX  and running the SAS session in UTF8  encoding but with no luck. In the Output (Excel) the superscript appears not as a superscript but just like regular text beside the value.

 

 

My SAS  version is 9.4M3  on a Linux machine. The Goal is to read the data into a SAS dataset, do some massaging of the data in the dataset and then dump the contents into an Excel or PDF file. Excel version is either 2013 or 2016.

 

Any ideas?  Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

Sorry I can't download MS files. 

 

Is the superscript a font format change, or is it unicode character?

Formats (superscript, bold, etc) aren't kept when importing data. 

 

Try using superscript  ²  U+00B2 Superscript Two Unicode Character (see this page) in Excel to see if it gets imported.

 

View solution in original post

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

Sorry I can't download MS files. 

 

Is the superscript a font format change, or is it unicode character?

Formats (superscript, bold, etc) aren't kept when importing data. 

 

Try using superscript  ²  U+00B2 Superscript Two Unicode Character (see this page) in Excel to see if it gets imported.

 

pchegoor
Pyrite | Level 9

Thanks @ChrisNZ . The  Superscript is retained when using Unicode characters as opposed to formatting.This i guess is the way to go. 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 2 replies
  • 2234 views
  • 0 likes
  • 2 in conversation