Jump to content

How to copy the records in excel to mysql???


Recommended Posts

if your files aren't too big, you could also go for the option of sticking your data into say a text file and then running a command in mysql to import that data (make sure that your data is formatted correctly e.g. no blank lines etc)

 

i believe the command is:

 

load data local infile "pathname/filename.txt" INTO table tablename lines terminated by "\r\n";

 

the last bit just puts a carriage return in etc. It may not be suitable, but is fairly straight forward

 

 

Link to comment
Share on other sites

Hey,

 

I normally just convert the excel sheet to a CSV and import manually using a tool such as PHPMYADMIN. If you need to do it more often, consider uploading the excel document to the server and create some code to open and use the excel sheet.

 

I would personally import the excel sheet as XML and handle that way.

 

Justin

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.