Hi:
Robert is correct. CODEBASE is not an issue with DEV=ACTXIMG or DEV=JAVAIMG.
In fact, I don't think the DDE solution (although nice) was even necessary. When I use this original code to create the files, this is the URL that gets generated for the <IMG> tag (assuming the first example, where the image is in a subdirectory called IMAGES)
[pre]
<img alt="for Excel" src="C:\Sunil\Ministry ODS\test\images\images\grf2xl.png"
style=" border-width: 0px; height: 480px; width: 640px;" border="0" usemap="##LN00541" class="c Graph">
[/pre]
Which might be incorrect on the server -- especially if it is a Unix or Linux or Mac file server. The image would have to be stored in this -exact- location on the server for the file to load correctly.
However, when I use this code to create the files (note the difference in URL= option value for GPATH) --
[pre]
ods listing close;
ods html
path="C:\Sunil\Ministry ODS\test" (url=none)/* HTML output directory */
body="test.htm" /* HTML filename */
gpath="C:\Sunil\Ministry ODS\test\images" (url='.\images\') /* graphics output file location */
;
goptions reset=all device=actximg;
proc gchart data=sashelp.class;
hbar3d sex / sumvar=height type=mean
name='grf2xl' des='for Excel';
run;
quit;
ods _all_ close;
[/pre]
then a RELATIVE <IMG> tag gets generated
[pre]
<img alt="for Excel" src=".\images\grf2xl.png" style=" border-width: 0px; height: 480px; width: 640px;"
border="0" usemap="##LN00541" class="c Graph">
[/pre]
and the image file loads just fine in the browser and in Excel. The trick is that the PNG file will have to be moved to an IMAGES subdirectory on the network machine and that the IMAGES subdirectory will have to be UNDER the directory where TEST.HTM is located.
If BOTH the IMAGE and the HTML file would be in the same directory location, then the original poster needed to put URL=NONE for -both- the PATH and the GPATH options in order to build a relative <IMG> tag.
[pre]
ods html
path="C:\Sunil\Ministry ODS\test" (url=none)
body="htmltest.xls"
gpath="C:\Sunil\Ministry ODS\test" (url=none) ;
generates this tag in the HTML file:
<img alt="for Excel" src="grf2xl.png" style=" border-width: 0px; height: 480px; width: 640px;"
border="0" usemap="##LN00541" class="c Graph">
[/pre]
Also note that even though you named the file with ".XLS", you are not creating a true, binary Excel file. You are only creating a file that Excel knows how to open and if you try to open this file with Excel 2007, you will receive a message from Excel, that the contents of the file do not match the file extension, because Excel "detects" this difference between what's inside the file and what the file extension is.
I think of PATH and GPATH as specifying the physical location of the CREATED files -- when they exist on my machine. Then, using URL=NONE instructs ODS to make me a relative <IMG> tag -- by not using any part of the physical name in the IMG tag. So, when I move both files (the HTML and the PNG) to the web server machine or network machine, they can be loaded correctly.
If you are using a GPATH= option and if it points to the same location as the PATH= option, and you want a relative tag, then (URL=NONE) is the way to make it happen. On the other hand, if, as frequently happens on web sites, the HTML files are physically separated from the image files, then you use URL= to specify the relative subdirectory (such as .\images\) which should be put into the relative tag. If you needed an absolute URL for the <IMG> tag, then you could do:
[pre]
GPATH="c:\temp\images" (url="http://myserv.com/main/images/")
[/pre]
... but I never code absolute URLs for IMG tags without checking with my webmaster first. They frequently want to move stuff around without breaking links and relative links are better for that.
cynthia