Hi,
I did a proc report and i want to export it to an excel worksheet. No problem here.
Yet, i wanted to display the output starting at the second row (A2) of my excel worksheet. No problem here cause i added the START_AT suboption in ODS EXCEL.
ods excel file ="..."
options(sheet_interval='none', start_at='1,2') ;
So my proc report output starts at cell A2 in excel and the first row is empty. I want to change the background color of the entire first row into red to get something like this ;
Thanks
Using two titles .
data have;
set sashelp.heart;
array x{40} $ (40*'xxx');
run;
title color=red bcolor=red 'xxxx';
title2 color=red bcolor=red 'xxxx';
ods excel file ="c:\temp\temp.xlsx"
options(sheet_interval='none' embedded_titles='yes' start_at='1,1' hidden_rows="3") ;
proc report data=have(obs=10) nowd ;run;
ods excel close;
title color=red bcolor=red 'xxxx';
ods excel file ="c:\temp\temp.xlsx"
options(sheet_interval='none' embedded_titles='yes' start_at='1,1' hidden_rows="2") ;
proc report data=sashelp.class nowd ;run;
ods excel close;
Hi,
Thank you for your code but it doesn't work exactly as i wanted.
It stops at column Q while my report is from column A to column Z. Do you know why ?
Thank you very much
NO. I get the right result ! what version sas are you using ?
You can contact support.sas.com to confirm what is problem.
Here is my code and snapshot .
data have;
set sashelp.heart;
array x{40} $ (40*'xxx');
run;
title color=red bcolor=red 'xxxx';
ods excel file ="c:\temp\temp.xlsx"
options(sheet_interval='none' embedded_titles='yes' start_at='1,1' hidden_rows="2") ;
proc report data=have(obs=10) nowd ;run;
ods excel close;
SAS version should like 9.4M4 , 9.4M5 ...
Using the following to check sas version.
%put &sysvlong4.;
But since I got no problem , I think I can't help you . Buy a ticket to support.sas.com
Or @Cynthia_sas could give you a hand .
Using two titles .
data have;
set sashelp.heart;
array x{40} $ (40*'xxx');
run;
title color=red bcolor=red 'xxxx';
title2 color=red bcolor=red 'xxxx';
ods excel file ="c:\temp\temp.xlsx"
options(sheet_interval='none' embedded_titles='yes' start_at='1,1' hidden_rows="3") ;
proc report data=have(obs=10) nowd ;run;
ods excel close;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.