DATA Step, Macro, Functions and more

Highlighting and multi-sheet

Reply
New Contributor
Posts: 2

Highlighting and multi-sheet

Can you show example code to add detail sheets to an ODS HTML sheet with highlighted rows and cells?

SAS Super FREQ
Posts: 8,868

Re: Highlighting and multi-sheet

Hi:
I am not sure what you mean by "detail sheets" when you make an ODS HTML file, even from multiple SAS outputs, the HTML file is 1 HTML page. If you open the HTML file in Word, then it is 1 Word doc; if you open the HTML file with Excel then it is 1 Excel worksheet in 1 workbook. So there is not a concept of "multi-sheet" with ODS HTML. If you plan to open the SAS output file with Excel, you might be better served by looking at other destinations.

On the other hand, if you switch to ODS TAGSETS.EXCELXP or ODS EXCEL, then you can easily get multi-sheet workbooks.

Regarding your question about highlighted rows and cells -- the method you use for highlighting will depend on your procedure of choice. This paper outlines methods of highlighting in PROC PRINT, PROC REPORT and PROC TABULATE:
http://support.sas.com/resources/papers/proceedings13/366-2013.pdf
cynthia
New Contributor
Posts: 2

Re: Highlighting and multi-sheet

Posted in reply to Cynthia_sas

Hi,

 

I found out I can perform highlighting and also have multiple sheets in one workbook. I just have to revert to outputting to older Excel version, saving to an .xls file.

 

Thanks!

 

Super User
Posts: 19,855

Re: Highlighting and multi-sheet


chprby12 wrote:

Hi,

 

I found out I can perform highlighting and also have multiple sheets in one workbook. I just have to revert to outputting to older Excel version, saving to an .xls file.

 

Thanks!

 


It depends on your version of SAS. If you have 9.4+ you can use ODS EXCEL and get a native XLSX file. 

 

ODS HTML will produce an HTML file, even if you label it xls. Excel will open it (most of the time) but you will have a warning pop up.

Super User
Posts: 19,855

Re: Highlighting and multi-sheet

HTML doesn't have the concept of pages or sheets. It's a continuous document, but you can link to other HTML pages or within the same document if you really wanted. 

 

If you search on LexJansen.com you'll fin a ton of examples and papers people have written on this topic.

 

http://www2.sas.com/proceedings/sugi28/023-28.pdf

 

https://www.mwsug.org/proceedings/2014/SA/MWSUG-2014-SA13.pdf

 

 

 

 

 

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