Desktop productivity for business analysts and programmers

Issue Reading in Excel with Special Characters

Reply
New User
Posts: 1

Issue Reading in Excel with Special Characters

I have an excel file which contains lower case sigmas as column headers.  Removing the sigmas will successfully read in the file.  Is there a way to keep the sigmas?  The error message notes:  "Failed to transcode data from utf-16le to wlatin1 encoding because it contained characters which are not supported by your SAS session encoding."

 

I am using Enterprise Guide 7.1.

Super User
Super User
Posts: 8,273

Re: Issue Reading in Excel with Special Characters

Posted in reply to BreakingQuant

The first thing to do is to switch the SAS server that your version of Enterprise Guide connects to one that is using unicode support.  Then SAS will not need to try to transcode into WLATIN1 character set.

 

It still might not work since I don't know if you can really use such strange characters for variable names.  It is best to keep your variable names as normal SAS names.  Maximum of 32 characters, Starts with underscore or letter (A to Z), only contains letters(A to Z), digits (0 to 9) or underscore.

 

Super User
Posts: 10,557

Re: Issue Reading in Excel with Special Characters

Posted in reply to BreakingQuant

Since it causes lots of extra work typing in those non-standard names, you should change the columns names to standard SAS rules (see @Tom's post). If you want to keep the reference, put the original column names in SAS variable labels. You will still need to switch to unicode SAS for this, though.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 2 replies
  • 159 views
  • 0 likes
  • 3 in conversation