BookmarkSubscribeRSS Feed
brophymj
Quartz | Level 8
The
ods _all_ close;
ods tagsets.ExcelXP path='\\Netapp4\Sasdata\Risk Modelling\CL Fleet\ROI\2014\00 - Main DWH\Enhanced DWH' file='Claims_dists.xml'
style=Printer;
%macro sheets(var);
ods tagsets.ExcelXP options(sheet_name="&var");
proc print data=&VAR._DIST noobs style(Header)=[just=center];
run; quit;
%mend;
%sheets(OWN);
%sheets(TPI);
ods tagsets.ExcelXP close;
6 REPLIES 6
Reeza
Super User

You should talk to tech support, there are too many things to check.

ie.

Does the macro run without using tagsets?

Do you have the latest version of tagsets?

What version of SAS?

Is the code running and then crashing as the file tries to open the XML file?

brophymj
Quartz | Level 8

The macro runs fine and produces the multisheet excel file no problem. It's only when i run something else in sas that it takes ages to do anything and I have to close out of it.

I use the Base version.

ballardw
Super User

How many records are you printing? SAS be default tries to open you output and it may be taking a long time to render. Also if you exceeded the number of rows of the program that may be trying to display the data (Excel anyone?) that process is hanging.

The superfluous quit; shouldn't be causing an issue.

Have you run this without the macros as 2 proc print calls within the tagsets.excelxp?

Or with file='\\Netapp4\Sasdata\Risk Modelling\CL Fleet\ROI\2014\00 - Main DWH\Enhanced DWH\Claims_dists.xml'

instead of Path and file?

brophymj
Quartz | Level 8

I know why it is happening now but I don't know how to stop it. Loads of script is being generated in the Reviewer and even once the xms files are created the Reviewer keeps being populated with code.

In terms of size, the files have 6000 rows and 4/5 columns.

Is there some code I can use to stop the Reviewer generating script.

My intention, once the XML files are created is to convert them to xlsx.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

I am a bit confused by your post.  What is the "Reviewer"?  As for your intention, XLSX files are merely a ZIP of XML files in Open Office format.  Also, you can achieve a multi-sheet output by using:

SHEET_INTERVALTableInterval to divide the output between worksheets. Values are Table, Page, Bygroup, Proc, or None

So you may not need to generate the code, set all your data together with a title column, then do a proc report by.

Reeza
Super User

Go into options and turn off the setting that states - View results as generated.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 6 replies
  • 1419 views
  • 0 likes
  • 4 in conversation