Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fill Excel range with XML?
Message
De
16/11/2003 10:28:54
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00849641
Message ID:
00850425
Vues:
32
Hi Lisa

I once made VFP COM objects grab data from VFP, and using VBA, had the COM object return requested field values, and navigate through the records. It was the fastest way I could find. Debugging was a nightmare, because the error messages produced by VBA/COM/VFP (God only knows which one was really complaining) were too cryptic to clearly indicate the source of the problem. Gosh, doesn't that sound familiar? ADO and ODBC were slower by far.

XML just seems so much simpler. Fox produces the XML in the blink of an eye.

I imagine populating the range would be like this...

oRange(XMLConstant) = m.lcXML

but I can't get that to work. The examples I found on the internet were too complicated and not documented well enough. Again unfortunately all too familiar.

Is Excel not able to populate a range with XML? XML is supposed to be a way to move data between services? Excel claims to support XML and VFP claims to support XML. So what's wrong with XML in this case?

More generally, why is there is always 10 ways to do everything? Wouldn't it be simpler to understand if there were fewer ways? Certainly, it can be done from Excel, but that's another language, with it's own idiosyncracies.

I'd really like to see it operate so I can decide if its performance is good enough.

If such a command as the one I imagine exists, it amounts to Excel pulling the data from the XML string, without having to use VBA. That seems simpler to me. It would be one line of code!

>Mike, I'm usually the first one to recommend XML, but in this case I don't see what it is going to buy you.
>
>If you want user control and if you want to avoid File I/O IMHO you should drive this from Excel, not VFP.
>
>Write a macro -- which they can call whenever they like, or you can assign to a template, or whatever. It can prompt them for a range or they can select the range before calling the macro.
>
>if I were doing this.... I think that the macro would probably a connection to the VFP data using the OLE DB provider and dump the data directly into the range from there.
>
>Doesn't this seem appropriate to you? It would be quite fast.
>
>>L<
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform