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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.