Jump to content

importing data to mysql from microsoft word document


shane07

Recommended Posts

Hello

I needed to import data from microsoft word document to mysql like what we normally do from excel to mysql.

But different problem arises during reading the word file.

e.g. unnecessary information from header information. I don't know how to strip those information.

I could not explode the data in the format as I needed.

 

As a reference my word file contains data in following format:

 

Name1

Address1

Phone1

 

Name2

Address2

Phone2

 

and so on.

Is there any way to import those data into mysql?

Your first step will be to export your Word document as a plain text file so that the content in it will be saved as plain ASCII text without all the underlying encoding being used in the file.

 

The second best option would be to use the COM extension to let you open and process the Word document. This will require that you research and learn the Word commands necessary to locate and select text within the document.

 

The worst option would be to attempt to read the raw .doc file and attempt to parse it yourself.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.