General information
Category:
Coding, syntax & commands
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only