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:
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.
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.
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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: