DATA Step, Macro, Functions and more

exported html works locally but not when send via email

Accepted Solution Solved
Reply
Regular Contributor
Posts: 203
Accepted Solution

exported html works locally but not when send via email

I export the HTML 5 results from SAS EG to my desktop. I end up with one HTML file. When I open it on my local machine it shows figures images nicely in a browser. However, when I send it via email and open the attachment the images are not shown. Is there anything I can do to embed the images in one html file similar to a Jupyter notebook? Thanks!

 

 


Accepted Solutions
Solution
‎05-14-2018 08:55 AM
Super User
Posts: 9,868

Re: exported html works locally but not when send via email

Posted in reply to csetzkorn

@csetzkorn wrote:
Sure but Jupyter notebook embeds images somehow, which is more user friendly ...

That's because it uses an additional layer in its backend that works like a content management system. When you use ODS HTML, you work on the level of HTML, not on the level of a CMS.

And keep in mind that you're a SAS programmer, not just a SAS user. This means that there are things you need to take care of, while also opening up a lot of flexibility. Proper definition of the path options will lead to output that is contained in a single directory tree and can be handled (for copying etc) in one fell swoop.

 

Maybe it's because I'm old, but I happily trade a lot of "comfort" for having direct control over the working of things.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code

View solution in original post


All Replies
Trusted Advisor
Posts: 1,831

Re: exported html works locally but not when send via email

Posted in reply to csetzkorn

A html page with pictures is actually a file.htm and a directory that contains the pictures.

What have you sent by email? and how have you done it?

Post your code in order that the forum can help you.

Regular Contributor
Posts: 203

Re: exported html works locally but not when send via email

Actually I just found the folder with the images looking at one of the HTML img tags:

 

<div class="c">
<img alt="The SGPlot Procedure" src="HTML%20-%20PA2BubblePlots1_files/img0.png" style=" height: 480px; width: 640px;" border="0" class="c">
</div>

 

Sorry! Is it possible to embed them like in a Jupyter notebook?

 

 

 

 

Trusted Advisor
Posts: 1,831

Re: exported html works locally but not when send via email

Posted in reply to csetzkorn

I'm not familiar with Jupyter notebook.

Alternatively you can zip the directory containing the html + image files.

The receiver should unzip it.

Regular Contributor
Posts: 203

Re: exported html works locally but not when send via email

Sure - just not very userfriendly
Respected Advisor
Posts: 2,802

Re: exported html works locally but not when send via email

Posted in reply to csetzkorn

PDF or RTF is user-friendly, would that meet your needs?

--
Paige Miller
Regular Contributor
Posts: 203

Re: exported html works locally but not when send via email

Posted in reply to PaigeMiller
Sorry but that's the requirement. I will use saspy in a Jupyter Notebook ...
Super User
Posts: 9,868

Re: exported html works locally but not when send via email

Posted in reply to csetzkorn

That's how HTML handles non-textual data. Images, videos, audio etc. are served as separate files.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Regular Contributor
Posts: 203

Re: exported html works locally but not when send via email

Posted in reply to KurtBremser
Sure but Jupyter notebook embeds images somehow, which is more user friendly ...
Solution
‎05-14-2018 08:55 AM
Super User
Posts: 9,868

Re: exported html works locally but not when send via email

Posted in reply to csetzkorn

@csetzkorn wrote:
Sure but Jupyter notebook embeds images somehow, which is more user friendly ...

That's because it uses an additional layer in its backend that works like a content management system. When you use ODS HTML, you work on the level of HTML, not on the level of a CMS.

And keep in mind that you're a SAS programmer, not just a SAS user. This means that there are things you need to take care of, while also opening up a lot of flexibility. Proper definition of the path options will lead to output that is contained in a single directory tree and can be handled (for copying etc) in one fell swoop.

 

Maybe it's because I'm old, but I happily trade a lot of "comfort" for having direct control over the working of things.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Regular Contributor
Posts: 203

Re: exported html works locally but not when send via email

Posted in reply to KurtBremser
Totally agree ...
Super User
Posts: 13,293

Re: exported html works locally but not when send via email

Posted in reply to KurtBremser

Or at least knowing when I am letting the system defaults take over and what they are.

☑ This topic is solved.

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

Discussion stats
  • 11 replies
  • 178 views
  • 3 likes
  • 5 in conversation