Hi I am working on some stuff where i need to Import the data present in XML file to excel sheet.
i wrote below code for it
Sub ImportXMLtoList()
Dim strTargetFile As String
Application.DisplayAlerts = False
strTargetFile = "C:\BookData.xml"
Workbooks.OpenXML Filename:=strTargetFile, LoadOption:=xlXmlLoadImportToList
Application.DisplayAlerts = True
End Sub
I want to do it in Excel 2003 using Macros. When i run the same above code in MS2007 it imports data succesfully,but it opens an new excel file and paste the data in Row order.
But when i run the same code in MS2003 a pop saying "The specified XML Source Doesnt refer to a schema.Excel will create schema based on the XML source data" is displayed, when i click ok button then Nothing is pasted in Excel.
I can say XML contains Repeating and Non-Repeating Elements.Is there any way to import the required elements data instead of all data present in XMl.
Import XML Data to Excel using Excel Macros
Page 1 of 1|
|

New Topic/Question
Reply



MultiQuote


|