Solved

Image in Excel XML file with XSLT transformations

Posted on 2006-06-30
2
1,012 Views
Last Modified: 2008-02-01
I understand that we can not export image / shapes/ vba, etc. when we save an Excel spreadsheet as XML. I am creating a spreadsheet via a web process (it doesn't matter which). I gather the data and apply an XSLT template to the data and deliver it in the response buffer (after setting the content type too). This all works great - i have found a ton of examples on how to do this ASP, .Net - etc.

But how, there has to be a way, do I insert an image (logo) at the top of the spreadsheet report during this transformation?
0
Comment
Question by:frankirchner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 250 total points
ID: 17026166
Hi frankirchner,
> at the top of the spreadsheet report during this transformation?

Is this spreadsheet report an HTML report or an Excel report
The datamodel for Excell XML does not allow images, so you could use it for the import process either
.net and ASP examples out there use the excell objects directly... this you can't do in XSLT in an easy way
(I would not recommend you to use XSLT for that)

Best option if you really want to do this using XSLT
is using the HTML table format...
that is a simple operation, adding an extra <tr>with a <td> containing an <img>

likely not what you were looking for...

Cheers!
0
 

Author Comment

by:frankirchner
ID: 17042178
Here is the Peice of code taken from MS Knowledge base:
    Private Sub SendResults(ByVal context As HttpContext, ByVal ds As DataSet)
        'Set up the response for Excel.
        context.Response.ContentType = "application/vnd.ms-excel"
        context.Response.Charset = ""

        'Transform the DataSet XML using transform.xslt
        'and return the results to the client in Response.Outputstream.
        Dim tw As XmlTextWriter
        Dim xmlDoc As XmlDataDocument = New XmlDataDocument(ds)
        Dim xslTran As XslTransform = New XslTransform
        xslTran.Load(context.Server.MapPath("transform.xslt"))
        xslTran.Transform(xmlDoc, Nothing, context.Response.OutputStream)
        context.Response.End()
    End Sub

So no - this is not a HTML Spreadsheet and i can not use the Excel Com Object either. I will accept your anwer that it can not be done this way. I was hoping not to have to build an HTML spreadsheet. But the graphic is that important.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
XML Parsing Classic ASP 5 74
Word files to Wordpress Posts 2 73
PHP alternative to file_get_contents('php://input') 4 154
C# Formatting DateTime String Value 5 52
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question