Dobrý den, mám problém. Uložil jsem si sešit excelu jako "Tabulka xml 2003" (xml formát, který umí načíst excel)
<?xml version="1.0"?>
<?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 xmlns="urn:schemas-microsoft-com:office:office">
<Author>Josef Hranec</Author>
<LastAuthor>Josef Hranec</LastAuthor>
<Created>2015-09-14T12:14:30Z</Created>
<Version>15.00</Version>
</DocumentProperties>
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
<AllowPNG/>
</OfficeDocumentSettings>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>14235</WindowHeight>
<WindowWidth>28800</WindowWidth>
<WindowTopX>0</WindowTopX>
<WindowTopY>0</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="Calibri" x:CharSet="238" x:Family="Swiss" ss:Size="11"
ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
</Styles>
<Worksheet ss:Name="List1">
<Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="5" x:FullColumns="1"
x:FullRows="1" ss:DefaultRowHeight="15">
<Row ss:Index="2">
<Cell ss:Index="2"><Data ss:Type="String">a</Data></Cell>
</Row>
<Row>
<Cell ss:Index="2"><Data ss:Type="String">b</Data></Cell>
</Row>
<Row>
<Cell ss:Index="2"><Data ss:Type="String">c</Data></Cell>
</Row>
<Row>
<Cell ss:Index="2"><Data ss:Type="String">d</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.78740157499999996" x:Left="0.7" x:Right="0.7"
x:Top="0.78740157499999996"/>
</PageSetup>
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>5</ActiveRow>
<ActiveCol>3</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>
K tomuto formátu potřebuji přistupovat jako ke klasickému xml dokumentu. Ovšem funkce
Private Sub ToolStripButton3_Click(sender As Object, e As EventArgs) Handles ToolStripButton3.Click
Dim XMLD As New XmlDocument
XMLD.Load("Pracovni.xml")
MsgBox(XMLD.SelectNodes("//Row").Count)
End Sub
vrátí 0 i když jsou tam 4 uzly. Můžete mě prosím někdo nasměrovat? Velice děkuji, Hranec.
|