Display image in Excel file - XSLT transformation

Questions about XML that are not covered by the other forums should go here.
XSLTQuestions
Posts: 1
Joined: Fri Apr 17, 2020 2:23 pm

Display image in Excel file - XSLT transformation

Post by XSLTQuestions » Fri Apr 17, 2020 2:33 pm

I am performing transformation from XML to Excel using XSLT(1.0). Cell data is written file. But issue occurs while using 'img' tag.
Output Excel file generated doesn't show the image in cell. The image file is available at the required location.

Code: Select all

<Row>            
            
              <ss:Data ss:Type="String">
                <img src="flower.png"/>
              </ss:Data>
            </ss:Cell>
          </Row>
So, I have below questions-
1. Is this correct way to insert an image?
2. Like in HTML, can we insert image in Excel cell using base64 value?

TIA

Radu
Posts: 6981
Joined: Fri Jul 09, 2004 5:18 pm

Re: Display image in Excel file - XSLT transformation

Post by Radu » Tue Apr 21, 2020 8:08 am

Hi,

I do not have experience with embedding images in Excel. How about if you try this? Use Excel to create a small table, insert an image inside it, save to a new xlsx file. Then use Oxygen's Archive Browser view to open that Excel archive and look inside it. I'm guessing that the XML file will just have a reference to the image file which will be saved in a separate folder. So you will probably need to do something similar with your setup which generates the xlsx file.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply