Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word to dbf ?

Status
Not open for further replies.

ShyFox

Programmer
Joined
Mar 22, 2003
Messages
210
Location
ES
Hy,
I faced for the first time with a situation: a firm has a lot of datas into word files. this word files have a header too (e.g. man | women | childs).
My question will be if Fox can import the *.doc format into dbf? Or an excell file, at least???
Regards

As I go deeper the road seems to go further. We're just simply pasangers on the road of knowledge.
 
I think *.docC can't import to *.dbf, but if you write it as txt - you can. The xls files can be import to dbf (eg:
by wizard)
Regards

Monika from Warszawa (Poland)
(monikai@yahoo.com)
 
Hi SHyFox,

If the documents are saved as txt files with consistency as to the length of data elements, you can import into dbf files by creating a prg to read the strings and then convert into your fields.

xls formats can be imported :-)

:-)

ramani :-)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
ShyFox

Another option would be to automate Word and store the whole document in a string and parse it.
Code:
oWord=CREATEOBJECT("word.application")
oWord.Documents.Open("c:\doc4.doc")
oSelection=oWord.Selection
oSelection.WholeStory && Select all
myString =oselection.Text && Store in a variable


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
You can use (i use VFP6):
IMPORT FROM NameOfXls(with path) XL5 SHEET NameOfSheet

Name of Fields in DBF are as column (A, B, ..., AB, ..., IV)


Monika from Warszawa (Poland)
(monikai@yahoo.com)
 
First: I thank you all.
Second: the word file it's in fact a report.
Why? Because it shows something like:



Field one Field two Field three
-------------------------------------
blabla bla etc
la a tc
page 1 of n

and so on...

So the data is not formated, but Ishall try to make it in a txt and from there to build it in a free table.
Regards


As I go deeper the road seems to go further. We're just simply pasangers on the road of knowledge.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top