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;
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.
Try:
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.
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.
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')
FRAME='/home/yourUsername/myfolder/frame.html';
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.