Have:
%LET WGHTML=P:\TEMP;
%LET WGINDEX=index.html;
ods html5 path="&WGHTML.\" (no_top_matter no_bottom_matter)
style=HTMLBlue
file="&WGINDEX."
(title="MyTitle")
;
/*
style(report)=[tagattr='id="unique_id"']
is not outputting a table ID in the html...how come??!
*/
proc report data=sashelp.cars nowd style(report)=[tagattr='id="unique_id"'];
column Make Model Cylinders;
define Make / group;
compute after Make;
line ' ';
endcomp;
run;
ods html5 close;
No "unique_id" id output inside HTML page:
What I want is this:
I want to add an ID for my proc report table output, so I can add more css layouts etc.
So the ID comes here:
My question is:
-How can I add a unique table ID to the ouput in the SAS ODS/Proc Report step?
I tried as you can see in the SAS-code to do it with
style(report)=[tagattr='id="unique_id"']
but no luck...
what am I missing here? Please any help?
Hi:
Usually, I only use TAGATTR with the ODS destinations for EXCEL. The ODS HTML destinations have an attribute called HTMLID that you can use in a simple style override, as shown below. It may not always go into the place you want it to go. I wasn't sure it would work with ODS HTML5, but in this case, it seems to have worked -- I used "wombat" as the attribute value for HTMLID so I could find it easily in my search:
Hope this helps,
Cynthia
Hi:
Usually, I only use TAGATTR with the ODS destinations for EXCEL. The ODS HTML destinations have an attribute called HTMLID that you can use in a simple style override, as shown below. It may not always go into the place you want it to go. I wasn't sure it would work with ODS HTML5, but in this case, it seems to have worked -- I used "wombat" as the attribute value for HTMLID so I could find it easily in my search:
Hope this helps,
Cynthia
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.