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.

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 689 views
  • 0 likes
  • 2 in conversation