Good afternoon,
I wrote a piece of data that allows me to export to Excel with formatting. However, in the output the text wraps as if the "ALT+ENTER" function in Excel was active. I tried to solve it with "wrap" without success.
Can you help me?
Thank you
ods excel file="prova.xlsx" options
(
sheet_name="Dati"
embedded_titles='yes'
autofilter='yes'
frozen_headers='yes'
tab_color='blue'
);
proc report data=new.prova nowd
style(report)=[frame=void rules=none width=50%];
define PRESENZA_SOSPESI_SI_NO / style(header)=[background=#009597 foreground=white font_weight=bold];
define INTERVENTI /style(header)=[background=#009597 foreground=white font_weight=bold];
run;
ods excel close;
proc report data=new.prova nowd
style(report)=[frame=void rules=none width=50%];
define PRESENZA_SOSPESI_SI_NO / style(header)=[background=#009597 foreground=white font_weight=bold];
define INTERVENTI /style(column)=[tagattrs="wrap:no"];
run;
Try adding the FLOW='TABLES' suboption as shown below and described in this SAS Note:
ods excel file="prova.xlsx" options
(
sheet_name="Dati"
embedded_titles='yes'
autofilter='yes'
frozen_headers='yes'
tab_color='blue'
flow='tables');
proc report data=new.prova nowd
style(report)=[frame=void rules=none width=50%];
define PRESENZA_SOSPESI_SI_NO / style(header)=[background=#009597 foreground=white font_weight=bold];
define INTERVENTI /style(column)=[tagattrs="wrap:no"];
run;
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore 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.