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

Click here to load this message in the networking platform