Cynthia,
I was trying to do the same thing using the ods tagsets.excelxp would I be able to try your third suggestion or was that specific to a particular output type.
The idea is to create an automated procedure, but I will check into using a macro in excel also.
Thanks,
Martinez
If you use the tagsets. to pass images, they are stored in the xml/html as would regular html websites. They provide the path and attempt to render them. This means that if your excel file is meant to be sent to another computer, it will only render the image if either the path to the image provided is the full path on the server AND the folder in which you've stored the image is shared to public - or that you used relative path and provided a copy of the image within the same zip and thus got extracted at the same relative path. It's somewhat tedious.
The only way around which I know of within SAS is using DDE statement to open the created file in excel, insert the image with DDE and then save the excel file again through DDE in a .xls format. It's quite dense since it requires some knowledge of excel commands and I must aknowledge last I did something like this I did not have to tailor around save as formats, my excel sheet was already an xls file. I can try to provide at least some basics (I don't know much more than basics of DDE myself) if you fall back to this option.
The nice thing about this is that you can purposedly copy an image top left anchor in a selected excel cell so you can chose the positioning.
Vincent
Vince,
DDE sounds like a great solution. I have an excel macro that adds images to a1 cell for every sheet and then apply to all needed workbooks.
If I have already closed the ods output could I use dde to insert the image after my ods close statement?
Thanks,
Martinez
As far as I am aware, yes. If you already have coded an excel macro doing this, you can use DDE to copy the macro in new excel files and run it instead of doing a DDE command specific image insert.
Vince,
Thank you I will start learning about DDE and give it a shot. Appreciate all the help
Martinez
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.