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