BookmarkSubscribeRSS Feed
MART1
Quartz | Level 8

Thanks @ChrisHemedinger 

I now understand a bit better how this works.

 

Just to clarify, here is what I do to build this Excel pack:

- I use the Report Builder Interface to build a number of SAS reports;

- I then export them as .srx format and import in Excel using the SAS Add-In for MS Office. The reports are spread across a number of tabs  (and work very well apart from this formatting issue).

 

I do so in order to have an automated process, and to have everything in one place (Excel).

 

I see exporting in Html keeps the formatting, but if I had all the outputs in html I'd need to combine all of those in one central place (like I do in Excel).

 

 

Using tagsets.MSOffice2k I can only see the html output - I don't see where the excel output is created? here is what I'm using  

 

 

options sastrace=',,,d' sastraceloc=saslog NOSTSUFFIX;
OPTIONS FULLSTIMER;


 ods tagsets.msoffice2k_x 
file="%sysfunc(getoption(work))/output.xls" 
 options(panelcols="2") style=normal;


Title "Tables";


	PROC SQL;
		Title "Table 1";
		SELECT t1.Make, 
			t1.Model, 
			t1.Type, 
			t1.EngineSize
		FROM SASHELP.CARS t1
			WHERE MAKE IN ("Saab", "Volvo")
		;
	QUIT;



	PROC SQL;
		Title "Table 2";
		SELECT t1.Make, 
			t1.Model, 
			t1.Type, 
			t1.EngineSize
		FROM SASHELP.CARS t1
			WHERE MAKE IN ("BMW", "Infiniti")
		;
	QUIT;

 ods tagsets.msoffice2k_x close;

again, many thanks

 

 

 

 

 

 

 

 

ChrisHemedinger
Community Manager

The file is in the WORK folder for your SAS session. EG should detect it and offer to download/open it for you in an external application:

 

ChrisHemedinger_0-1650905268401.png

 

You can also use the Copy Files task in EG to add a download step to your process flow to copy this file from the server to a local folder on your PC.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
Ksharp
Super User
You can install this tagset as long as you can running sas code .

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 17 replies
  • 3302 views
  • 1 like
  • 4 in conversation