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

Dear all,

I am using SAS University Edition, trying to export charts and graphs to multiple sheets on an excel file called "Final_Report_2013.xlsx".

On the first try of creating a single sheet, then again for 2 sheets, it worked fine, but later when I am tried for the complete report I get the message: 

NOTE: Writing EXCEL file: /folders/myfolders/Final_Report_2013.xlsx
 ERROR: ZIP entry duplicate name: xl/media/SGPlot.png.

 

Initially I thought since that file already exists, hence 'duplicate name', but even after deleting it, or changing the new file name, I get the same error. Below I have keyed in the initial part of the code:

ods excel file= "/folders/myfolders/Final_Report_2013.xlsx" options (sheet_name = "Change in Price across Months");
ods graphics / reset width=8.0in height=6.0in imagemap;
proc sgplot data=WORK.PRICE_VS_MONTHS;
	title "Variation of Laptop Configuration Prices Over Time";
	vline month / response=retail_price group=configuration curvelabel stat=mean;
	yaxis grid;
run;
ods graphics / reset;
ods excel options (sheet_name = "Variance in price of Laptops across Months");
title 'Variance in price of Laptops across Months';
title " Configuration = 12"; /* Key in the configuration as above */
proc sgplot data=sample_product;
  vbar Month / response= Retail_Price
           barwidth=1.0 fillattrs=graphdata2;
run;
.
.
.
.
.
.
.
. ods excel close;
 Can someone help me out on this Please?
1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

It's caused by the

ods graphics / reset;

It resets the base graphic filename, so it tries to write to the same file. Use a specific reset here, resetting only the options you want changed.

View solution in original post

3 REPLIES 3
Kurt_Bremser
Super User

It's caused by the

ods graphics / reset;

It resets the base graphic filename, so it tries to write to the same file. Use a specific reset here, resetting only the options you want changed.

aboral
Fluorite | Level 6
Thank you Kurt for the response. I know this is going to be stupid, but let me ask you, when you say "Use a specific reset here", if you elaborate a bit more on it Please. Frankly I just learn recently about the graphs from graphicallyspeaking, copy pasted the codes making a few tweaks according to my requirements. Thank you in advance.
Tom
Super User Tom
Super User

Why not just try removing the statement?

 

Or add code to tell SAS what name to use for the graphics file?  Here is some old documentation that came up at top of Google search.

https://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_odsgraph_se...

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 2983 views
  • 3 likes
  • 3 in conversation