Data visualization with SAS programming

Export graph and table to html.

Reply
Contributor
Posts: 60

Export graph and table to html.

Hi All
Can somebody help me with this issue?
goptions
reset=ALL
device=html;
ods listing close;
ods html path='F:\Export\' body='graph.html';

proc tabulate
FIRST PROC TABULATE
run;
proc gchart
FIRST GRAPH
run;
proc tabulate
SECOND PROC TABULATE
run;
proc gchart
SECOND GRAPH
run;
quit;
ods html close;
ods listing;

In SAS result viewer result is :
first table
first graph
second table
second graph
SAS Log:
Html source written F:\Export\index.html
In export folder I found index.xtml with just second graph and graph.html whit just the tables no graphs.
On place where should be a graph gif is empty box for picture.
Also in same folder I found two gif files with graphs.

What I want to is export just to graph.html (no index.html) and to both graphs gif appears in html with tables.
Can somebody tell me where I was wrong?
Thank you in advance
SAS Super FREQ
Posts: 890

Re: Export graph and table to html.

Hey Bob,

I think the problem is that you are using device=HTML. This can create an additional HTML file. Just use a device like PNG with your ODS HTML destination and see if that works for you.

Thanks!
Dan
Contributor
Posts: 60

Re: Export graph and table to html.

Hi Dan
Thank you for quick respond
Problem is still there but now, with your help, I get rid of index.html. Still, on place where should be a graph gif is empty box for picture.
If you have any other solution please write.
Regards
Bob
Super Contributor
Posts: 273

Re: Export graph and table to html.

Bob
your gif image is elsewhere
if you forget to specify in
ods html gpath=' F:\... ' in addition to path=' ' ....;

eventually followed by (url=none) if your are not going on a web server

Andre
Contributor
Posts: 60

Re: Export graph and table to html.

Hi Andre
Thank you for your answer.
Problem is somewhere else not in the sas statement. When I open html from place where is exported everything works fine but when I try to open it in my local web page I see just a table.
Probably problem is in configurations of my Apache server.
Thank you Andre
Thank you Dan

Regards
Bob
Super Contributor
Posts: 273

Re: Export graph and table to html.

Bob
are you sure?

did you check the text version of your html page to see the "reference" to your gif file?

then take a look at one of those text about ( url=none)
if you find a complete adress in the html page.

Andre

[pre]
http://support.sas.com/documentation/cdl/en/grstatug/62464/HTML/default/p1ju4v8j7d0kken1jh1bjj7kyjo1...

http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#a002133562.htm

[/pre]
Contributor
Posts: 60

Re: Export graph and table to html.

Hi Andre
My apology you were right.
I followed the link you sent to me and resolved problem.(wrong path)

For that matter I establish new rules for behaving on sas forum when something going wrong on SAS (at least for myself).

In a attempt to find where the problem is I will start to suspect on:

First – on myself (usually this working with 94 % probability)
Second – on operational system (1 %)
Third – on faith (1 %)
Fourth – on hardware (1 %)
Fifth – on word conspiracy (1 %)
Sixth – sas statement (1 %)
Seventh - on god (1 %)
Eighth – on my forum friend, who trying to help me, because I ignored rule no. 1 (0%)

Regards
Bob
Super Contributor
Posts: 273

Re: Export graph and table to html.

Bob

Stop at sixth the sas statement by example gpath= or (url=none)
and search (google) statement site:sas.com
What i have done to find the links

Andre

/////////
Seventh - on god (1 %)
Eighth – on my forum friend, who trying to help me, because I ignored rule no. 1 (0%)
Ask a Question
Discussion stats
  • 7 replies
  • 253 views
  • 0 likes
  • 3 in conversation