Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!

ODS excel using proc document issues with sgplots

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

ODS excel using proc document issues with sgplots

Hello,

 

I am using SAS EG 7.13.

 

I am trying to output graphs from multiple different programs using the ODS document statement.  I am able to capture all of my graphs in the document and I am able to replay them with no issues.  The issue I am running into is trying to then output them to excel as PNG files.  here is my code:

ods excel file="my file path on sas server" options(embedded_titles='yes' sheet_name="output");

proc document name=pt_graphs;

replay;

quit;

ods excel close;

if I just run the proc document it works and displays fine but when I try and output it to excel I get a "zip duplicate entry name: xl/media/gmap.png" error.  If I try and run it again I get an "resource is write-locked by another thread" and I cant do anything until I restart SAS EG.  Any help would be appreciated!

 


Accepted Solutions
Solution
‎03-26-2018 01:06 PM
Occasional Contributor
Posts: 12

Re: ODS excel using proc document issues with sgplots

Posted in reply to hulksmash

Looks like I solved my question but replying to help others.

 

I was outputting two map graphs and in the ods document they were both named "gmap".  When it wrote to excel even with the "sheet_name=" option, excel assumed it had two sheets named the same thing.  I added a "name=" option to my sgplot and it fixed the issue however the excel output had each sheet name output1, output2 ...outputn so my guess is SAS renames the sheets AFTER the proc document outputs with the default names.

View solution in original post


All Replies
Solution
‎03-26-2018 01:06 PM
Occasional Contributor
Posts: 12

Re: ODS excel using proc document issues with sgplots

Posted in reply to hulksmash

Looks like I solved my question but replying to help others.

 

I was outputting two map graphs and in the ods document they were both named "gmap".  When it wrote to excel even with the "sheet_name=" option, excel assumed it had two sheets named the same thing.  I added a "name=" option to my sgplot and it fixed the issue however the excel output had each sheet name output1, output2 ...outputn so my guess is SAS renames the sheets AFTER the proc document outputs with the default names.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 166 views
  • 0 likes
  • 1 in conversation