Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading an HTM file
Message
De
20/03/2012 10:08:01
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
20/03/2012 09:14:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01538744
Message ID:
01538776
Vues:
42
>>>Hi All:
>>>
>>>My client receives purchase orders in HTM format. He now prints them and enters them manually into his accounting system. He wants to read them in VFP and process them programatically.
>>>
>>>Any pointers on how to read a .HTM file in VFP?
>>
>>Strtofile() once, strextract() many times.
>>
>>It can be done, but for any success you need to find some text that precedes and follows the strings you want to extract. Usually, these are tags with unique IDs set in them - so you find the ID, then the tag in which it is, then the closing tag for that tag, and then what you were looking for is between these tags.
>>
>>The trouble will arise if whoever generates these files isn't consistent - they change the formatting, IDs, and you have to redo a lot. Or there are no ID or name clauses in the tags surrounding your data - then you may be quite out of luck automating this. You can't extract a string if you can't locate it - but then maybe you can influence the source, i.e. have the maker of the purchase orders provide IDs.

OOooops... meant "FileToStr() once, strextract() many times."

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform