Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7853105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:34:59+00:00 2026-06-02T19:34:59+00:00

I’m using the .Net framework’s XslCompiledTransform class as the XSLT processor (in other words

  • 0

I’m using the .Net framework’s XslCompiledTransform class as the XSLT processor (in other words Xslt 1.0).

My requirement is that I want to convert an XML file to an Excel file (xls file) using XSLT 1.0 and .Net [4.0].

For simplicity and since this is just test code, I’m just considering some simple hard-coding on my Xsl file.

Specifically, my two questions are:

  1. I’ve tried a bunch of things, yet I can’t see my Excel sheet’s worksheet named to “wAbc” which is what I’m trying to name it. I see the worksheet name as my file name. Additional worksheets are not generated as well. Below is my XSL file
  2. Additionally, since this is test code, I can’t see the data outputted on different rows unless I use HTML tags . What I see is: AbcNext line instead of

    Abc
    Nextline

So what am I doing wrong? Thank you in advance for your time and help.

I set the content type for my file response as

application/vnd.ms-excel

Here is my test Xsl file:

<?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
        xmlns="urn:schemas-microsoft-com:office:spreadsheet"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:msxsl="urn:schemas-microsoft-com:xslt"
        xmlns:o="urn:schemas-microsoft-com:office:office"
        xmlns:x="urn:schemas-microsoft-com:office:excel"
        xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" 
    xmlns:html="http://www.w3.org/TR/REC-html40">


      <xsl:template match="/">
        <xsl:processing-instruction name="mso-application">progid='Excel.Sheet'</xsl:processing-instruction>
        <Workbook>
            <Worksheet ss:Name="wAbc">
              <Table ss:ExpandedColumnCount="2" x:FullColumns="1" x:FullRows="1" ss:DefaultRowHeight="15">
                <Column ss:AutoFitWidth="20" ss:AutoWidth="65"></Column>
                <Row>
                  <Cell>
                    <Data ss:Type="String">Abc</Data>
                  </Cell>
                </Row>
                <Row>
                  <Cell>
                    <Data ss:Type="String">Next line</Data>
                  </Cell>
                </Row>
              </Table>
              <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
                <PageSetup>
                  <Header x:Margin="0.3"/>
                  <Footer x:Margin="0.3"/>
                  <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
                </PageSetup>
              </WorksheetOptions>
            </Worksheet>
        </Workbook>
      </xsl:template>
    </xsl:stylesheet>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:35:00+00:00Added an answer on June 2, 2026 at 7:35 pm

    Excel XLS files use a Microsoft proprietary binary format – no way to generate that with an XSLT.

    The (relatively) new XSLX format is a set of XML files that are ZIPped together, so in principle you can generate these files with an XSLT, and then ZIP them to generate the final file – still not very easy. To see these files simply un-ZIP an XSLX file.

    I suggest you generate a simpler format – either a CSV or an intermediate XML- and then import it into Excel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using XSLT to translate a RIXML file to XML. Our RIXML contains
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am doing a simple coin flipping experiment for class that involves flipping a
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.