![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Filter XML Data for Display on Different Excel Worksheets Filter XML Data for Display on Different Excel WorksheetsTo: NULL Date: 3/1/2005 10:17:00 AM 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. | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
