04-22-2017 11:57 AM - last edited on 04-22-2017 01:45 PM by Reeza
I got three html files.I am able to see table of contents and body file seperatly in a browser. But when I opened frame file I dint see anything. It looks like a blank page when I opened it in IE. I am supposed to see body as well as table of contents embeded int it together. Why frame file is not working as expected in this case.
Please some one help me with it.
libname learn xlsx '/folders/myshortcuts/s2/college.xlsx'; ods html body='body_sample.html' contents='content_sample.html' frame='frame_sample.html' path='/folders/myshortcuts/s2/ODSOutput'; proc print data=learn.sheet1; run; proc means data=learn.sheet1 n mean min max; run; ods html close;
04-22-2017 01:54 PM
I know why its happening but not howing to fix it.
When you create the file the paths to the body/contents file are '/folders/myfolders/' but that doesn't apply once you're out of the VM. It makes sense from SAS perspective and anyone working with SAS on a server will have the same issue.
You could manually fix the frame page but that's not a good fix.
04-24-2017 02:14 PM
ods html body='body_sample.html' contents='content_sample.html' frame='frame_sample.html' path='/folders/myshortcuts/s2/ODSOutput'; ods html body='Print.html'; proc print data=learn.sheet1; run; ods html body='means.html'; proc means data=learn.sheet1 n mean min max; run; ods html close;
Your main Body file likely doesn't contain any of the output. Create a separate html file for each group of tables/output you wish to see with a reference in the contents.
04-24-2017 02:23 PM
The paths in the file end up being /folders/my shortcuts/.... which doesn't exist on your computer, when using SAS UE, so the body/content files aren't found.
10-04-2017 09:22 AM - edited 10-04-2017 09:50 AM
I got the same problem because I'm using SAS Studio. As I can't open my html files directly with a web broswer, I have to download them, but then the reference to the 2 html files in the frame.html are wrong.
What's working for SAS Studio is the use of the URL suboption, allowing to use relative URLs. So as long as the files are in the same directory or storage location, it should work.
ods html FILE='/home/yourUsername/myfolder/data.html' (url = 'data.html') CONTENTS='/home/yourUsername/myfolder/tabOfContent.html' (url = 'tabOfContent.html')