Solved

Image in Excel XML file with XSLT transformations

Posted on 2006-06-30
2
995 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
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VB.NET WEb Service complex type 14 57
Merge XML into DOM 5 27
RSS Feed Parsing for Images 5 45
XML to SQL Table using c# 5 46
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…
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, …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now