DATA Step, Macro, Functions and more

ODS HTML - Frame file not working as expected

Reply
Contributor s_m
Contributor
Posts: 22

ODS HTML - Frame file not working as expected

[ Edited ]

 

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;
Super User
Posts: 17,840

Re: ODS HTML - Frame file not working as expected

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. 

Super User
Posts: 10,501

Re: ODS HTML - Frame file not working as expected

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.

 

Super User
Posts: 17,840

Re: ODS HTML - Frame file not working as expected

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.  

Ask a Question
Discussion stats
  • 3 replies
  • 142 views
  • 0 likes
  • 3 in conversation