Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extracting xml from an excel file
Message
From
05/09/2006 16:30:46
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Extracting xml from an excel file
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01151090
Message ID:
01151090
Views:
92
Hello,
Does anyone have exprience with extracting info from an excel ".xml" file?
It should be straight forward. But I'm having problems extracting the xml based on the mappings from an xsd.
I have the following:
ox = CREATEOBJECT('excel.application')
ox.Workbooks.Open("ExcelXMLFile.xml")
oaSheet = ox.ActiveSheet
oxml = oaSheet.XmlMapQuery("ns1:PSV","xmlns:ns1='http://tempuri.org/XMLSchema.xsd'", ox.ActiveWorkbook.XmlMaps("PSV_Map")).Value

The last 3 lines are really on one line. The ".Value" returns the value for the very first node in the xml file. But if I add the first parameter of "/ns1:PSV/ns1:BodyMaterial" for the xpath query, the value will be for the BodyMaterial. I just want to retrieve the whole xml file that excel generates based on the XmlMaps "PSV_Map". Am I making any sense? lol
Thanks,
Daniel
Next
Reply
Map
View

Click here to load this message in the networking platform