BookmarkSubscribeRSS Feed
ssaha
Obsidian | Level 7

When I am trying to run this below piece of code from SAS EG, the xml file is opening with the required data

 

ods tagsets.excelxp file="/trnapp/sas/dev/projects/so/shovan/&rep_name._9.xml" style=printer;
proc report data=p.testing;
columns _all_;
define road_number / 'road_number' style={tagattr="format:@"};
run;
ods tagsets.excelxp close;

 

But when I am trying to run this code from a stored process( The stored process contain several macros and in one of the macro contains the above code) through SAS Portal, I am able to download the file and when I am opening it it is saying "Unable to Read File". The file is getting created in the physical location and the size is only of some KBs and also when I am opening that file it is giving that error. FYI,This code is within a %do; %end clause in one of the macro from the stored process but from SAS EG i was running it without %do; %end.

 

Can you please help me regarding this.

1 REPLY 1
ChrisHemedinger
Community Manager

It's difficult to determine exactly what's going on from your description.  Are you running at least SAS 9.4 Maint 3?  If so, I recommend using ODS EXCEL instead of EXCELXP tagset.  You'll get a native XLSX file (not XML file) that will have fewer problems downstream.

 

This might not solve this problem, which might be caused by differences in your stored process environment versus standard SAS workspace.

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!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

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