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

 

 

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

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.