jerryw
2005-10-26 09:55:05 UTC
Sub Tst6()
Dim MyXMLDoc As New DOMDocument40
Dim neCells As IXMLDOMNodeList
MyXMLDoc.Load "c:\ExcelXML1.xml"
MyXMLDoc.setProperty "SelectionLanguage", "XPath"
MyXMLDoc.setProperty "SelectionNamespaces",
"xmlns:w='urn:schemas-microsoft-com:office:spreadsheet'"
Set neCells = MyXMLDoc.selectNodes("//w:cell")
MsgBox neCells.Length
End Sub
Based on everything I see, this code should work on an Excel
spreadsheet saved as XML but nothing I try gets cells, worksheets,
workbooks, etc.
Please advise.
Thank you.
Dim MyXMLDoc As New DOMDocument40
Dim neCells As IXMLDOMNodeList
MyXMLDoc.Load "c:\ExcelXML1.xml"
MyXMLDoc.setProperty "SelectionLanguage", "XPath"
MyXMLDoc.setProperty "SelectionNamespaces",
"xmlns:w='urn:schemas-microsoft-com:office:spreadsheet'"
Set neCells = MyXMLDoc.selectNodes("//w:cell")
MsgBox neCells.Length
End Sub
Based on everything I see, this code should work on an Excel
spreadsheet saved as XML but nothing I try gets cells, worksheets,
workbooks, etc.
Please advise.
Thank you.