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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.