Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extracting xml from an excel file
Message
From
06/09/2006 10:36:52
 
 
To
05/09/2006 16:30:46
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01151090
Message ID:
01151334
Views:
23
Well I have a solution now. But it's really not what I wanted, but it works. And it's straight forward.
I made an error in my first question. The code has ox.ActiveSheet, it should be ox.ActiveWorkbook. Anyway, saying,

oaSheet = ox.ActiveWorkbook
oaSheet.XmlMaps(1).Export("c:\ExcelExportXML.xml")

This will send the xml to a file of course. I would rather
have it sent to a variable.. oh well.


>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
Previous
Reply
Map
View

Click here to load this message in the networking platform