Guest Shadaan Posted September 3, 2010 Share Posted September 3, 2010 Hi All,I have an excel sheet from which I need to read the data. Below is the sample Excel <?xml version="1.0" encoding="UTF-8"?> <?mso-application progid="Excel.Sheet"?> <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"> <DocumentProperties/> <CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> <ArrayDelimiter dt="string">,</ArrayDelimiter> <RaveDbVersion dt="string">5.6</RaveDbVersion> <Locale dt="string">eng</Locale> </CustomDocumentProperties> <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> <ActiveSheet>0</ActiveSheet> </ExcelWorkbook> <Styles> <Style ss:ID="ColumnCaption"> <Alignment ss:Horizontal="Automatic" ss:Vertical="Automatic" ss:WrapText="1"/> <Font x:Family="Automatic" ss:Bold="1" ss:Italic="0"/> <NumberFormat ss:Format="@"/> <Protection ss:Protected="1"/> </Style> <Style ss:ID="ColumnCaption_alt"> <Alignment ss:Horizontal="Automatic" ss:Vertical="Automatic" ss:WrapText="1"/> <Font x:Family="Automatic" ss:Bold="1" ss:Italic="0"/> <Interior ss:Color="#ECE9D8" ss:Pattern="Solid"/> <NumberFormat ss:Format="@"/> <Protection ss:Protected="1"/> </Style> <Style ss:ID="Default"> <Alignment ss:Horizontal="Automatic" ss:Vertical="Automatic" ss:WrapText="1"/> <Font x:Family="Automatic" ss:Bold="0" ss:Italic="0"/> <NumberFormat ss:Format="@"/> <Protection ss:Protected="0"/> </Style> <Style ss:ID="Default_alt"> <Alignment ss:Horizontal="Automatic" ss:Vertical="Automatic" ss:WrapText="1"/> <Font x:Family="Automatic" ss:Bold="0" ss:Italic="0"/> <Interior ss:Color="#ECE9D8" ss:Pattern="Solid"/> <NumberFormat ss:Format="@"/> <Protection ss:Protected="0"/> </Style> <Style ss:ID="Protected"> <Alignment ss:Horizontal="Automatic" ss:Vertical="Automatic" ss:WrapText="1"/> <Font x:Family="Automatic" ss:Bold="0" ss:Italic="0"/> <NumberFormat ss:Format="@"/> <Protection ss:Protected="1"/> </Style> <Style ss:ID="Protected_alt"> <Alignment ss:Horizontal="Automatic" ss:Vertical="Automatic" ss:WrapText="1"/> <Font x:Family="Automatic" ss:Bold="0" ss:Italic="0"/> <Interior ss:Color="#ECE9D8" ss:Pattern="Solid"/> <NumberFormat ss:Format="@"/> <Protection ss:Protected="1"/> </Style> <Style ss:ID="CenteredCell"> <Alignment ss:Horizontal="Center" ss:Vertical="Automatic" ss:WrapText="1"/> <Font x:Family="Automatic" ss:Bold="0" ss:Italic="0"/> <NumberFormat ss:Format="@"/> <Protection ss:Protected="0"/> </Style> <Style ss:ID="CenteredCell_alt"> <Alignment ss:Horizontal="Center" ss:Vertical="Automatic" ss:WrapText="1"/> <Font x:Family="Automatic" ss:Bold="0" ss:Italic="0"/> <Interior ss:Color="#ECE9D8" ss:Pattern="Solid"/> <NumberFormat ss:Format="@"/> <Protection ss:Protected="0"/> </Style> </Styles> <Worksheet ss:Name="CRFDraft" ss:Protected="1"> <Table> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Width="150" ss:AutoFitWidth="1"/> <Column ss:Index="200" ss:Hidden="1"/> <Row ss:AutoFitHeight="1"> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">DraftName</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">DeleteExisting</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">ProjectName</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">ProjectType</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">PrimaryFormOID</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">DefaultMatrixOID</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">ConfirmationMessage</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">SignaturePrompt</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">LabStandardGroup</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">ReferenceLabs</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">AlertLabs</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">SyncOIDProject</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">SyncOIDDraft</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">SyncOIDProjectType</Data></Cell> <Cell ss:StyleID="ColumnCaption"><Data ss:Type="String">SyncOIDOriginIsVersion</Data></Cell> </Row> <Row ss:AutoFitHeight="1"> <Cell ss:StyleID="Default"><Data ss:Type="String">11</Data></Cell> <Cell ss:StyleID="Default"><Data ss:Type="String">FALSE</Data></Cell> <Cell ss:StyleID="Default"><Data ss:Type="String">XXXPROJECTNAMEXXX</Data></Cell> <Cell ss:StyleID="Default"><Data ss:Type="String">Project</Data></Cell> <Cell ss:StyleID="Default"><Data ss:Type="String">EN</Data></Cell> <Cell ss:StyleID="Default"><Data ss:Type="String">BASE</Data></Cell> <Cell ss:StyleID="Default"><Data ss:Type="String">Data Saved</Data></Cell> <Cell ss:StyleID="Default"><Data ss:Type="String"><small>I understand that I am responsible for data entered into theSystem under my account name and password. I understand that sharing of passwords is illegal. I hereby confirm that all data is accurate to the best of my knowledge.</small></Data></Cell> <Cell ss:StyleID="Default" ss:Index="14"><Data ss:Type="String">Project</Data></Cell> <Cell ss:StyleID="Default"><Data ss:Type="String">FALSE</Data></Cell> <Cell ss:StyleID="Default" ss:Index="200" ss:Formula="=IF(LEN(Forms!RC1)>0,Forms!RC1,"")"/> </Row> . . . . . What I need to do is read the Values Of Project Name which I is declared in the third cell of the Row element of the value is in the third cell of the last Row Element through XSLT...Kindly please help Link to comment Share on other sites More sharing options...
Martin Honnen Posted September 3, 2010 Share Posted September 3, 2010 <xsl:template match="/"> <xsl:value-of xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" select="descendant::ss:Row[last()]/ss:Cell[3]/ss:Data"/></xsl:template> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.