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

Hi...I am trying to export an image to a worksheet in excel and when I open the excel worksheet the image seems to be different with duplication of the left side of the original image. Any suggestions why this might be occurring and how to rectify this from happening...thanks.

 

proc template; 
define style styles.background;
parent=styles.Excel;
style header/ fontsize=11pt backgroundcolor=cornflowerblue;
end;
run;

title;
footnote;
ods _all_ close;
goptions device=actximg;
ods excel file="%sysfunc(pathname(project))\Postal Code Map.xlsx";
ods excel options (	sheet_interval='none' sheet_name="Map" start_at="2,4") style=background;

goptions iback="I:\Postal Code Map\Postal Code Map.png"  vsize=6in hsize=6in; ;
proc gslide border;
run;

ods excel close;

 

Output:

Map.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

IBACK is not an option I use but I suspect that as a background image that default is to repeat the image to fill the page. If your image is 6 inches wide and the "page" for Excel is 8 inches wide then I think you get a 2 inch repeat horizontally.

 

You might try adding IBACKPOS=Center to the goption statement with IBACK and see if that helps.

I don't see a default for IBACKPOS specified.

 

 

View solution in original post

2 REPLIES 2
ballardw
Super User

IBACK is not an option I use but I suspect that as a background image that default is to repeat the image to fill the page. If your image is 6 inches wide and the "page" for Excel is 8 inches wide then I think you get a 2 inch repeat horizontally.

 

You might try adding IBACKPOS=Center to the goption statement with IBACK and see if that helps.

I don't see a default for IBACKPOS specified.

 

 

twildone
Pyrite | Level 9

Hi Ballardw….With your suggestion I ended up through trial and error adjusted the hsize to 4.5 inches and it looks fine now...Thanks once again.

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!

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
  • 2 replies
  • 1002 views
  • 0 likes
  • 2 in conversation