ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2968 views
  • 0 likes
  • 2 in conversation