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-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!

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.

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