How to import data from xml to excel sheet using macros

Manukrrish

New member
Local time
Today, 07:41
Joined
Jul 11, 2012
Messages
1
Hi I am working on How to import data from xml to excel sheet using macros,
i am using MS2003, 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
But when i run the 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.

Please help in this
 
Welcome aboard:)
I moved this post to the macro section since you requested a macro solution.
 

Users who are viewing this thread

Back
Top Bottom