Hello,
Combined ODS HTML statement with PROC SGPLOT, I tried to generate a bunch of both separate .png files and .html files, and it really worked, and can be viewed on my local computer perfectly(See the Source Code below). When I tried to share the .png and .html files with my colleagues, the .html files cannot be opened by IE, and generated an error message "Internet explorer has disabled the execution script and active control", I wonder if there is any way to display the .html files correctly in any PC.
ODS HTML PATH ="&path.\贷款投向行业分析" GPATH = "&path.\贷款投向行业分析\图片" FILE = "各银行制造业大类投向占比.html"; OPTIONS NOBYLINE; ODS GRAPHICS / IMAGEMAP=ON; PROC SGPLOT DATA=ANA_IB_BIND_MFG_P2_ADJ(WHERE=(INDUSTRY_NAME_G NE '制造业合计')) DATTRMAP = ATTRMAP_LINE_2; BY BANK_ORDER1 CN_SHORTNAME NOTSORTED ; TITLE '#BYVAL1..#BYVAL2--2015年4季度至2017年3季度制造业大类投向占比'; SERIES X = REP_DT Y = LOAN_BAL_ALL_PCT/ MARKERS GROUP = INDUSTRY_NAME_G GROUPORDER = DATA ATTRID = INDUS_B SMOOTHCONNECT TIP = (REP_DT INDUSTRY_NAME_G LOAN_BAL_ALL_PCT) TIPLABEL = (AUTO '行业' '投向占比') ; XAXIS VALUEATTRS = (SIZE = 8 WEIGHT = BOLD) DISPLAY = (NOLABEL) VALUESFORMAT = YYQC4. INTERVAL = QUARTER VALUES=("31DEC15"d TO "31DEC17"d BY QUARTER) ; YAXIS VALUES=(0.15 0.2 TO 0.4 BY 0.025) VALUEATTRS = (SIZE = 8 FAMILY = ARIAL) LABELATTRS = (Weight=Bold SIZE = 8) LABELPOS= DATACENTER GRID; KEYLEGEND /NOBORDER POSITION = BOTTOMLEFT ACROSS = 3 AUTOITEMSIZE TITLE = "" ; RUN; ODS HTML CLOSE; ODS HTML;
I think the main problem is that the path is getting embedded in your HTML file. When you share you output with your colleagues, they do not have those paths. My recommendation is that you do the following on the ODS HTML statement:
1. Put (url=none) after the PATH option to prevent the path from being added to the HTML file.
2. Remove the GPATH option so that your images are written to the same directory as your HTML output.
Then, they can download the attachments into one directory and see the result as you do.
Hope this helps!
Dan
I think the main problem is that the path is getting embedded in your HTML file. When you share you output with your colleagues, they do not have those paths. My recommendation is that you do the following on the ODS HTML statement:
1. Put (url=none) after the PATH option to prevent the path from being added to the HTML file.
2. Remove the GPATH option so that your images are written to the same directory as your HTML output.
Then, they can download the attachments into one directory and see the result as you do.
Hope this helps!
Dan
Thanks for your reply, it really worked.
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.