BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
hulksmash
Obsidian | Level 7

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!

 

1 ACCEPTED SOLUTION

Accepted Solutions
hulksmash
Obsidian | Level 7

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

1 REPLY 1
hulksmash
Obsidian | Level 7

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.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1 reply
  • 1342 views
  • 0 likes
  • 1 in conversation