BookmarkSubscribeRSS Feed
LAtwood
Calcite | Level 5
I have the following code and I would like it to print two-sided duplex. Please help

proc template;
define tagset tagsets.test;
parent=tagsets.htmlcss;
define event doc;
start:
put ' put 'xmlns:x="urn:schemas-microsoft-com:office:excel">' NL;
finish:
put "" NL;
end;
define event doc_head;
start:
put "" NL;
put VALUE NL;
put "" NL;
finish:
put "" NL;
put "" NL;
end;
end;
run;

ODS LISTING CLOSE;

ODS MARKUP file=_WEBOUT tagset=tagsets.test
headtext= '';

PROC REPORT DATA=WORK.QUERY2_for_QUERY8665 NOWD
RUN;

ODS MARKUP close; Message was edited by: LAtwood
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
I wonder whether your _WEBOUT reference means that you are returning these results to a browser and then are going to use a "helper" application to launch Excel to open the HTML file???

If this is the case, then I also wonder why you are not using TAGSETS.MSOFFICE2K or TAGSETS.MSOFFICE2K_X or TAGSETS.EXCELXP to send your HTML or XML reports to Excel.

As for printing control, there has to be a way in the markup language to do what you want to do. So, for example, in the HTML - -specific to Excel -- if I want to do something and verify that it will work, I do this:
1) go to Excel -- type some numbers in a worksheet
2) make all the changes and header and footer and print options I want
3) save the file as either HTML, MHTM or 2003 Spreadsheet XML (this is important) do NOT save the file as a plain old XLS or XLSX because you want to see whether there is an HTML way or an XML way to do what you want
4) open the saved file with Notepad and look for the tags or CSS or controls for the change you made
5) if you are using ODS TAGSETS.EXCELXP or ODS TAGSETS.MSOFFICE2K_X -- look to see whether there's a suboption for the type of tag you need to generate ... for example, using the doc='Help' suboption will show you what print-related options are available.

If you find in #4, that the print option you set does NOT get put into the HTML or XML file, then this means that you have picked an option or setting that can only be done from inside Excel.

If you find the options/setting you want in #4, but you do NOT find the option or setting available to you in #5, when you investigate the default output, then and only then is it time to write your own tagset template.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 685 views
  • 0 likes
  • 2 in conversation