Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extracting xml from an excel file
Message
De
06/09/2006 10:36:52
 
 
À
05/09/2006 16:30:46
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01151090
Message ID:
01151334
Vues:
24
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform