Hi,
The SAS online documentation gave me the impression that it would be possible to use multiple values in the borderstyle attribute
However, the following code doesn't work:
ods excel file="&xxtest./reporting/test.xlsx"
options(start_at='2,2');
proc print data=sashelp.class noobs
style(header)=[borderstyle=none double solid none]
style(column)=[bordertopstyle =none
borderrightstyle =double
borderbottomstyle=solid
borderleftstyle =none];
run;
ods excel close;
Any idea about the right syntax?
In the SAS online documentation they don't use border-style but borderstyle without hyphen.
But beside that I've managed to find a possible explaination: border-style followed by multiple values is possible in CSS.
ods excel file="&xxtext/test.xlsx"
options(start_at='2,2')
cssstyle="&xxtext./test.css";*;
proc print data=sashelp.class noobs;
run;
ods excel close;
test.css
.header, .rowheader {background-color:yellow;border-style=none double solid none;}
.data {background-color:pink;border-style=none double solid none;}
You want this ?
ods excel file="c:\temp\test.xlsx"
options(start_at='2,2');
proc print data=sashelp.class noobs
style(header)=[borderstyle=none ]
style(column)=[bordertopstyle =none
borderrightstyle =double borderrightwidth =2
borderbottomstyle=solid borderbottomwidth=2
borderleftstyle =none];
run;
ods excel close;
Hi,
Here the question is: how to get more than one value for borderstyle as it seems possible according to the SAS online doc.
I don't know . Maybe @Cynthia_sas knows .
In the SAS online documentation they don't use border-style but borderstyle without hyphen.
But beside that I've managed to find a possible explaination: border-style followed by multiple values is possible in CSS.
ods excel file="&xxtext/test.xlsx"
options(start_at='2,2')
cssstyle="&xxtext./test.css";*;
proc print data=sashelp.class noobs;
run;
ods excel close;
test.css
.header, .rowheader {background-color:yellow;border-style=none double solid none;}
.data {background-color:pink;border-style=none double solid none;}
Hi:
In my experience, borderstyle options are honored best in PDF and RTF destinations. Sometimes, HTML output will respect multiple borderstyles. I generally control using the left/right/top/bottom version of the style override instead of pumping them into one borderstyle attribute override. However, ODS EXCEL is difficult. Also, remember that bottom border for one cell "bumps into" or is adjacent to the top border for the cell underneath it. Same thing with left/right. The right side border for one cell is adjacent to the left border of the cell next to it. For example, 2 completely different "looks" for the same code:
So frequently, you do not get the look you want in any destination. Whether you can do what you want with multiple attributes in one override may turn out to need more investigation in the doc or with Tech Support.
Cynthia
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.