Hi,
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
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?
Hi:
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
ODS ESCAPECHAR='~';
and then see if your ^ symbol appears in the text.
cynthia
I just find another character '/' which cannot be displayed in column header of ods excel. It appears as a new line feed. Any solution?
Hi:
I do not observe that behavior, as shown below when using PROC PRINT or PROC REPORT:
Since the / is the default split character in PROC REPORT, I did need to modify the split= option in my PROC REPORT code. But as you can see in the default HTML and in the ODS EXCEL output, I can see the / in the column headers.
Cynthia
thank you, Cynthia.
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.
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.