Data visualization with SAS programming

Html files generated by SAS 9.4 ODS Graph cannot be opened by Internet Explorer

Accepted Solution Solved
Reply
Contributor
Posts: 29
Accepted Solution

Html files generated by SAS 9.4 ODS Graph cannot be opened by Internet Explorer

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;

 Undisplayed Html Screenshot.png

 


Accepted Solutions
Solution
‎11-16-2017 10:48 PM
SAS Super FREQ
Posts: 1,048

Re: Html files generated by SAS 9.4 ODS Graph cannot be opened by Internet Explorer

Posted in reply to Wang_Yajun

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

View solution in original post


All Replies
Solution
‎11-16-2017 10:48 PM
SAS Super FREQ
Posts: 1,048

Re: Html files generated by SAS 9.4 ODS Graph cannot be opened by Internet Explorer

Posted in reply to Wang_Yajun

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

Contributor
Posts: 29

Re: Html files generated by SAS 9.4 ODS Graph cannot be opened by Internet Explorer

Thanks for your reply, it really worked. 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 120 views
  • 0 likes
  • 2 in conversation