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-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!

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