Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML Created by Excel

Status
Not open for further replies.

Sammy145

Programmer
Oct 4, 2002
173
GB
I have an XML file and need to create XSL for it im new to this i managed to get the author but the rest is beyond me can some please explain how to get this

XML file

<?xml version=&quot;1.0&quot;?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;TEST.xsl&quot;?>
<Workbook xmlns=&quot;urn:schemas-microsoft-com:eek:ffice:spreadsheet&quot;
xmlns:eek:=&quot;urn:schemas-microsoft-com:eek:ffice:eek:ffice&quot;
xmlns:x=&quot;urn:schemas-microsoft-com:eek:ffice:excel&quot;
xmlns:ss=&quot;urn:schemas-microsoft-com:eek:ffice:spreadsheet&quot;
xmlns:html=&quot; <DocumentProperties xmlns=&quot;urn:schemas-microsoft-com:eek:ffice:eek:ffice&quot;>
<Author>Quick</Author>
</DocumentProperties>
<Worksheet ss:Name=&quot;QReport&quot;>
<Table ss:ExpandedColumnCount=&quot;56&quot; ss:ExpandedRowCount=&quot;233&quot;>
<Row>
<Cell ss:Index=&quot;4&quot;><Data ss:Type=&quot;String&quot;> September report With Figures</Data></Cell>
<Cell ss:Index=&quot;28&quot;><Data ss:Type=&quot;String&quot;>Required Weekday wsa:</Data></Cell>
<Cell ss:Index=&quot;34&quot;><Data ss:Type=&quot;String&quot;>0</Data></Cell>
</Row>
<Row>
<Cell ss:Index=&quot;7&quot;><Data ss:Type=&quot;String&quot;>Monday</Data></Cell>
<Cell ss:Index=&quot;13&quot;><Data ss:Type=&quot;String&quot;>Tuesday</Data></Cell>
<Cell ss:Index=&quot;19&quot;><Data ss:Type=&quot;String&quot;>Wednesday</Data></Cell>
<Cell ss:Index=&quot;26&quot;><Data ss:Type=&quot;String&quot;>Thursday</Data></Cell>
<Cell ss:Index=&quot;33&quot;><Data ss:Type=&quot;String&quot;>Friday</Data></Cell>
<Cell ss:Index=&quot;42&quot;><Data ss:Type=&quot;String&quot;>Saturday</Data></Cell>
<Cell ss:Index=&quot;48&quot;><Data ss:Type=&quot;String&quot;>Sunday</Data></Cell>
</Row>
<Row>
<Cell ss:Index=&quot;5&quot;><Data ss:Type=&quot;String&quot;>01-Sep</Data></Cell>
<Cell ss:Index=&quot;6&quot;><Data ss:Type=&quot;String&quot;>80% wsa</Data></Cell>
<Cell ss:Index=&quot;8&quot;><Data ss:Type=&quot;String&quot;>0</Data></Cell>
<Cell ss:Index=&quot;11&quot;><Data ss:Type=&quot;String&quot;>02-Sep</Data></Cell>
</Row>
<Row>
<Cell ss:Index=&quot;8&quot;><Data ss:Type=&quot;String&quot;>0</Data></Cell>
<Cell ss:Index=&quot;14&quot;><Data ss:Type=&quot;String&quot;>0</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
**********************************************************
TEST.XSL

<xsl:stylesheet version=&quot;1.0&quot;
xmlns:xsl=&quot;xmlns:ss=&quot;urn:schemas-microsoft-com:eek:ffice:spreadsheet&quot;
xmlns:eek:o=&quot;urn:schemas-microsoft-com:eek:ffice:eek:ffice&quot;>
<xsl:eek:utput indent=&quot;yes&quot;/>
<xsl:template match=&quot;/&quot;>
<html><body>
Author: <xsl:value-of
select=&quot;/ss:Workbook/oo:DocumentProperties/oo:Author&quot;/>
</body></html>
</xsl:template>
</xsl:stylesheet>
 
I cant believe im the only one doing this?

Anyone need further clarification?
 
Problem solved!

<xsl:template match=&quot;/&quot;>
<table><TR>
<xsl:for-each select=&quot;/ss:Workbook/ss:Worksheet/ss:Table/ss:Row&quot;>
<TD><xsl:value-of select=&quot;ss:Cell&quot;/></TD>
</xsl:for-each>
</TR></table>

</xsl:template>
 
Hello. I'm looking information about XML EXCEL and I found your thread.

I want to ask you something. I'm also new in xml and I'm trying to make a link that displays an excel report using XML.

My question may be a little stuped but since I have no idea of this. How did you created your xml file? did you use excel? I tried to view it but it gives me an error and I don't know how to solve it. It says:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
------------------------------------------------------------
Required white space was missing. Error processing resource 'file:///C:/Documents and Settings/Administrator/My Documents/XML/TEST.xsl'. Line 3, Position 11

xmlns:ss="urn:schemas-microsoft-com:eek:ffice:spreadsheet"
----------^

I'll appreciate your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top