Link to home
Start Free TrialLog in
Avatar of frankirchner
frankirchner

asked on

Image in Excel XML file with XSLT transformations

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?
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of frankirchner
frankirchner

ASKER

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.