salman_ahad@yahoo.com Posted November 19, 2009 Share Posted November 19, 2009 How do attach excel wooksheet(import) in MySql table "emails", Col 1: email_id, Col 2: emails I saved the data in excel (97-03) where in sheet 1 I have the data, column 1 is headed as email_id and Column 2 is headed as email. Need to import that data in table, do I need to write php code or just import from import button. Does it need to be in CSV form? Please help... Quote Link to comment https://forums.phpfreaks.com/topic/182087-solved-importing-data-from-excel-97-03/ Share on other sites More sharing options...
MadTechie Posted November 19, 2009 Share Posted November 19, 2009 CSV would be easier, via MySQL it would be something like this LOAD DATA INFILE 'datafile.csv' INTO TABLE tbl_name FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n' IGNORE 1 LINES; Quote Link to comment https://forums.phpfreaks.com/topic/182087-solved-importing-data-from-excel-97-03/#findComment-960575 Share on other sites More sharing options...
salman_ahad@yahoo.com Posted November 19, 2009 Author Share Posted November 19, 2009 Thanks I just saved the file as .CSV and imported the file. It did just perfect! Quote Link to comment https://forums.phpfreaks.com/topic/182087-solved-importing-data-from-excel-97-03/#findComment-960585 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.