Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading an HTM file
Message
From
20/03/2012 09:14:17
 
 
To
20/03/2012 05:40:43
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01538744
Message ID:
01538770
Views:
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.

Thanks!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform