Hello SAS people
Does anyone know if it is possible to control the wrapping of flyover text of a proc report column header in ODS EXCEL?
Purely to illustrate I have concocted a daft bit of flyover text for the sex variable which results in the M for Males not starting on its own line in the flyver text, at least not when I run the code.
All advice appreciated.
Thanks.
Am running SAS 9.4M4.
ods excel file='\\....\mytestfile.xlsx' options (sheet_name="My Sheet");
proc report data=sashelp.class style(header)={backgroundcolor=white color=black textalign=left fontfamily='Courier New' fontsize=8pt}
style(column)={fontfamily='Courier New' fontsize=8pt};
define name /style(header)={flyover='This is the persons name'};
define sex /style(header)={flyover='This is the recorded value of a persons sex: M=Male F=Female'};
define age /style(header)={flyover='This is the persons age'};
define height /style(header)={flyover="This is the persons height"};
define weight/style(header)={flyover='This is the persons weight'};
run;
ods excel close;
Hi,
It took a few tries and some reverse engineering, but it looks like if you take SAS out of the picture and just make a tooltip in Excel and use Alt+Enter in the tooltip, then what Excel inserts into the flyover window seems to be _x000a_ as shown in the XML below for the flyover where M=Male does start a new line.
cynthia
Here's the final SAS code and results:
If you are interested in the reverse engineering, I made a worksheet, put some typing in a cell, and then went to Data -->Data Validation and entered the text using Alt+Enter for my line feed. Then I examined the XML generated for my 2 cell sheet and you can see the _x000a_ string at the 2 places I used Alt+Enter:
Hi,
It took a few tries and some reverse engineering, but it looks like if you take SAS out of the picture and just make a tooltip in Excel and use Alt+Enter in the tooltip, then what Excel inserts into the flyover window seems to be _x000a_ as shown in the XML below for the flyover where M=Male does start a new line.
cynthia
Here's the final SAS code and results:
If you are interested in the reverse engineering, I made a worksheet, put some typing in a cell, and then went to Data -->Data Validation and entered the text using Alt+Enter for my line feed. Then I examined the XML generated for my 2 cell sheet and you can see the _x000a_ string at the 2 places I used Alt+Enter:
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.