I am trying to create an HTML doc and/or XLSx doc with ODS and cannot seem to get image to show up on Linux server.
Shows up fine in EG
Here is code
ods results on;
ods escapechar='~';
%LET FPATH=/sas/data/Comm_Bank/users/sadofmi/output/;
%let pict=KeyLogo.png; *** this is valid and small picture**;
ods html file="testp.html" path="&fpath.";
proc print data=sashelp.class;
title j=l h=2 '~S={preimage="&fpath.&pict"} Class Help Data Set';
run;
run;
Looks like HTML gets created properly: as
<img alt="" src="/sas/data/Comm_Bank/users/sadofmi/output/KeyLogo.png">
Any ideas will be appreciated
Mike
It works in EG because the application scans the HTML, finds all of the referenced images, downloads the images, and fixes the HTML IMG source tags to find them.
For other environments, you'll have to do as @Cynthia_sas says: change the ODS HTML statements to set the image path and the relative reference using the URL= suboption. Then as long as you keep the HTML and image file together in the same relative path, your browser apps should find both.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.