Solved

Image in Excel XML file with XSLT transformations

Posted on 2006-06-30
2
1,021 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

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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