BookmarkSubscribeRSS Feed
Q1983
Lapis Lazuli | Level 10

options missing=' ' topmargin=0.30in bottommargin=0.01in rightmargin=0.25in leftmargin=0.25in;

ods tagsets.ExcelXP file= '/sasdata/sasusers/sunt_smith/Mortgage_Recpature.xls';

ODS TAGSETS.ExcelXP

options(sheet_interval='none'

default_column_width='9'

sheet_name="SUMMARY"

center_horizontal="no"

frozen_headers = "Yes"

Orientation='Landscape'

embedded_titles='Yes'

fittopage="No"

blackandwhite="No"

Embedded_Footnotes='Yes'

absolute_column_width='9'

autofit_height="Yes");

PROC REPORT DATA= jaj.Mtg_stm_tot_cap_C1 style(summary)=Header;

title 'STM_TOT_CAPTURE %';

COLUMNS mdy numMorts numloans capN gla_l gla_r capD;

define mdy / order order=data style (column)=Header;

define numMorts / "STM Loans";

define numloans / "Competitor Loans";

define capN / f=number7.1'%' "STM Tot Cap#";

define gla_l / f=dollar15. "STM $";

define gla_r / f=dollar15. "Competitor $";

define capD / f=number7.1'%' "Tot Cap$";

rbreak after /summarize;*/;

endcomp;

compute after mdy;

endcomp;

label mdy = 'Month/Yr';

run;

/*above code runs fine.  Error generated starting here see bottom*/

title1 'STM Total Mortgage Capture Rate';

title2 '3 Month Moving Average';

proc sgplot data=jaj.Mtg_stm_tot_cap_C1;

series x=mdy y=CapN_Avg / markers lineattrs=(color=vibg) markerattrs=(color=vibg symbol=circlefilled)

markerattrs=(color=vibg symbol=circlefilled) ;

series x=mdy y=CapD_Avg / markers lineattrs=(color=red) markerattrs=(color=red symbol=circlefilled)

markerattrs=(color=red symbol=circlefilled) ;

label CapN_Avg = "%3MoCap#";

label CapD_Avg = "%3MoCap$";

run;

 

I am attempting to add in the proc sgplot here in the code.  However when I add in the proc sgplot I get the following error

Warning GPATH or PATH is not writable directory
Error: Cannot write image to /sasdata/sas94/config/Lev1/SASAPP/SGplot34.png

I read up on adding gpath and path however the output is in excel not html or xml.  The examples I have seen use HTML.  How can I get sgplot to work in ODS for excel??

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Use the code window (its the {i} above the post area) for code, keeps the formatting and makes it easier to read.  Anyways, you are creating XML output, tagsets create tagged text output, in this case XML.  Nothing to do with Excel, although Excel can read the XML file.  

The warning is telling you that you can't write to:

/sasdata/sas94/config/Lev1/SASAPP/

Therefore set the graph output to somewhere you can write to

Cynthia_sas
SAS Super FREQ

Hi:

  There is an even bigger issue. By Microsoft design, the type of XML created by TAGSETS.EXCELXP does NOT support graph images. So even if the paths were correctly pointed to a write-able location, TAGSETS.EXCELXP would NOT use the graph output.

 

  I would recommend that you use either ODS MSOFFICE2k -- to make an HTML file that Excel can open -- and the HTML output can support the inclusion of graphic output. OR use ODS EXCEL, which creates the type of XML that DOES support graph inclusion.

 

  But graphs will NOT work with TAGSETS.EXCELXP. I recommend you change to ODS EXCEL. And then, depending on how this code is being executed (from EG, from the Portal, from a Stored Process), there might need to be some changes to how the code is invoked because typically, except for EG, client applications on the BI Platform cannot "receive" TAGSETS.EXCELXP output unless the code is executed from EG or from the Stored Process Web App.

 

cynthia

ballardw
Super User

I am going to guess that you are working in some sort of server model of SAS. Paths are going to be relative to the server and would require a user to have appropriate permissions.

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
  • 3 replies
  • 988 views
  • 0 likes
  • 4 in conversation