merck_delmoro Posted May 8, 2009 Share Posted May 8, 2009 may I know how to copy the records in excel to mysql??? PHP script Quote Link to comment Share on other sites More sharing options...
trq Posted May 8, 2009 Share Posted May 8, 2009 see here. Quote Link to comment Share on other sites More sharing options...
Mark Baker Posted May 9, 2009 Share Posted May 9, 2009 may I know how to copy the records in excel to mysql??? PHP script Start by taking a look at PHP Libraries capable of reading Excel files, such as PHPExcel Quote Link to comment Share on other sites More sharing options...
kel Posted May 9, 2009 Share Posted May 9, 2009 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 Quote Link to comment Share on other sites More sharing options...
juma929 Posted May 9, 2009 Share Posted May 9, 2009 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.