Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Filter XML Data for Display on Different Excel Worksheets

From: "Mauricio Grimberg" <mau@---.---.-->
To: NULL
Date: 3/2/2005 11:08:00 AM
Perhaps the transformation is valid but it is not Excel Compliant.
You could try to output the transformation to a file and then try to open 
that XML file with Excel and wait for the error.
The date format that the dataset uses can be a problem.
If it is I can give you a workaround about it. Just tell me.

"Ken Powers" <KenPowers@d...> wrote in message 
news:1FD7AA3E-5871-47A1-AB01-617656FBB37B@m......
>I have an ASP.NET page that retrieves data from a SQL Server database and
> places it within a DataSet.  The DataSet is then converted into an XML 
> file.
> I have been attempting to use an XSLT file to format the XML in order to
> display the data in an Excel spreadsheet.  The spreadsheet will consist of 
> a
> single workbook with multiple Worksheets.  My goal is to filter the data 
> and
> send given row of data to a specific worksheet based on a value in one 
> column.
>
> My application uses the XMLTransform method.  The transform completes
> without any errors.  However, I am unable to load the xml file into Excel. 
> I
> wish I could give you a specific error message, but unfortunately Excel
> places the error information into a non-existent error log.  I say
> non-existent because I cannot find it using the Windows search feature 
> even
> when I search hidden files and folders of all folders.
>
> Anyway, here is the relevant code within the XSLT file.  I am happy to
> display more if necessary:
>
> <!-- This is my code to search for a value of "SupplyLogistics" in the
> Department column of my DataSet -->
> <!-- If this value is found, I want to apply the "SupplyLogistics" 
> template
> -->
>    <xsl:value-of select="parent::attribute::department='SupplyLogistics'">
>      <xsl:apply-templates select="SupplyLogistics" />
>    </xsl:value-of>
>
> <!-- Here is the "SupplyLogistics" template -->
> <xsl:template match="SupplyLogistics">
>  <Row>
>    <Cell><Data ss:Type="String"><xsl:value-of
> select="ProjectName"/></Data></Cell>
>    <Cell><Data ss:Type="String"><xsl:value-of
> select="ProjectDescription"/></Data></Cell>
>    <Cell><Data ss:Type="String"><xsl:value-of 
> select="Phase"/></Data></Cell>
>    <Cell ss:StyleID="Date"><Data ss:Type="DateTime"><xsl:value-of
> select="EstimatedDeploy"/></Data></Cell>
>    <Cell><Data ss:Type="String"><xsl:value-of
> select="RecentAccomplishments"/></Data></Cell>
>    <Cell><Data ss:Type="String"><xsl:value-of
> select="FocusItems"/></Data></Cell>
>    <Cell><Data ss:Type="String"><xsl:value-of
> select="EstBenefits"/></Data></Cell>
>    <Cell ss:StyleID="Currency"><Data ss:Type="Number"><xsl:value-of
> select="ISCost"/></Data></Cell>
>    <Cell><Data ss:Type="String"><xsl:value-of
> select="CorporateISLead"/></Data></Cell>
>    <Cell><Data ss:Type="String"><xsl:value-of
> select="BusinessLead"/></Data></Cell>
>    <Cell><Data ss:Type="String"><xsl:value-of
> select="Department='SupplyLogistics'"/></Data></Cell>
>  </Row>
>
> <!-- Here is the header of the xsl file -->
> <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:user="urn:my-scripts"
> xmlns:o="urn:schemas-microsoft-com:office:office"
> xmlns:x="urn:schemas-microsoft-com:office:excel"
> xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
>
> <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
> 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">
>
> <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
>  <DownloadComponents/>
>  <LocationOfComponents HRef="file:///\\"/>
> </OfficeDocumentSettings>
> <!-- Create the Excel workbook -->
> <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
>  <WindowHeight>8175</WindowHeight>
>  <WindowWidth>15135</WindowWidth>
>  <WindowTopX>0</WindowTopX>
>  <WindowTopY>1545</WindowTopY>
>  <ProtectStructure>False</ProtectStructure>
>  <ProtectWindows>False</ProtectWindows>
> </ExcelWorkbook>
>
> Any help you can give me would be appreciated. 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent