01-24-2018 02:41 PM
I'm trying to output a simple frequency using ODS. Either ODS or Excel is removing special characters in the field.
The SAS output window clearly displays the text "MCLab RO MAIN Campus^24D0404292^CLIA" with the hat character, but when I output it using ODS (either HTML or EXCEL), the hat characters are removed "MCLab RO MAIN CampusD0404292CLIA".
I would like for the ODS output to reflect exactly what is in the data. How do I make it so that it does not remove the hat character in the ODS output?
Thanks for your help
01-24-2018 03:04 PM - edited 01-24-2018 03:05 PM
Could this possibly be related to the ODS ESCAPECHAR option? If that option specified the hat character, then ODS would treat that character as an escape character. Perhaps that character is the default escape character in your environment. Maybe try setting it to some other character that isn't in your data?
01-24-2018 03:48 PM
I ran a little test and used that string for a label just with SASHELP.CLASS. I do not observe what you report. I see the caret/hat symbol being used in both ODS HTML and ODS EXCEL:
I am running 9.4 M3. Is there any chance that you were using ODS ESCAPECHAR='^'; elsewhere in your code? I find that if I have ESCAPECHAR set to ^, then the caret symbols are stripped out of the text string. As a test, right before you PROC FREQ, you could try
and then see if your ^ symbol appears in the text.