Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel xml spreadsheet - is it possible to embed images?

Tags:

.net

xml

excel

I'm trying to export data from a web app into excel, but there is a request to include the company's logo at the top of the spreadsheet. My normal method of creating the excel is to create a spreadsheet in excel and save it as an Xml Spreadsheet (Excel 2003). This allows me to build up the xml in code.

However, when attempting to save the excel worksheet as an xml worksheet I get warned that the image will be lost.

So, is it possible to embed an image from my application? I tried base64, but that didn't work.

<Data ss:Type="Base64">base64string here...</Data> isn't valid

Html isn't interpreted either. Is this possible?

Excel 2003 + is the target.

like image 256
ScottE Avatar asked Feb 04 '10 13:02

ScottE


People also ask

How do you enable embed all images in Excel?

Tip. To insert multiple images at a time, press and hold the “Control” key, while selecting images from the pop-up dialog box. After highlighting the various files, click “Insert” in the same way. All images will upload to the previously selected location in the Excel spreadsheet.

What is XML in Excel?

An XML table is an Excel table that has been mapped to one or more XML repeating elements. Each column in the XML table represents an XML element. An XML table is created when you: Use the Import command (in the XML group on the Developer tab) to import an XML data file.

Can you import XML into Excel?

Import multiple XML data files as external dataIf you're using Excel with a Microsoft 365 subscription, click Data > Get Data > From File > From XML.


1 Answers

I'm trying do the same export. And I'm stuck solving this problem too. But I've bad news, as MSDN describes here , the only ss:Type possible are:

Enumeration—Number, DateTime, Boolean, String, and Error

If you can open the .xls might this solution help you: http://polymathprogrammer.com/2010/11/10/how-to-insert-multiple-images-in-excel-open-xml/

Unfortunately, for me I still with no solution.

like image 159
Custodio Avatar answered Sep 30 '22 08:09

Custodio