BookmarkSubscribeRSS Feed
OS2Rules
Obsidian | Level 7
Hi All:

I'm relatively new to XML and I have a request to add an image to a spreadsheet that I create using the ExcelXP tagset. It will just be a small banner image in the top corner of the page.

I have tried to find some XML code examples on how this is done, but I can't seem to find any. I would like to place an external link in the spreadsheet that points to an image (.jpg, .bmp) that is in an external library, rather than having the image imbedded in the spreadsheet.

Chevell (SAS) has informed me that the tagset can't do this at this time, but there must be some trick, such as coding the tags in a TITLE statement that would work.

Any help/examples would be appreciated.
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi!
Chevell is right. You can prove it by trying this experiment:
1) open Excel
2) type something in a few cells
3) go to View --> Header and Footers
4) Insert a picture into the Header of the file
5) Save the spreadsheet to XML format

You will see the following message (from Excel):[pre]
The following features from your workbook will not be saved in the XML Spreadsheet
--Page header or footer image
Do you want to continue saving as an XML Spreadsheet?
[/pre]
Coding the images in a TITLE statement works for HTML, RTF and PDF because those destinations support the insertion of images in one form or the other. Microsoft does NOT -- at least for XML at this time. So IF you create an ExcelXP file with ODS, I think your only choice to get an image into the header of the document is to have an Excel Macro or VB script open the xml file, insert the image and then resave as an XLS file.

(Or wait until Microsoft changes the XML spec to accept images.)
cynthia

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
  • 1 reply
  • 2497 views
  • 0 likes
  • 2 in conversation