Hi friends

I have some names and address in macro excel.how can i import the values which are present in the macro excel to the mysql through php
thank you

8 Years
Discussion Span
Last Post by jcacquiescent27

There's a good reference in this post of how to do this, if you are using phpMyAdmin.
Here are a few steps:
1) Save the spreadsheet as a CSV file from Excel
2) Make sure you have a table set up in MySQL, having the fields you need and presented in the order you created in your spreadsheet.
3) Open the CSV file using a text editor (like Notepad++, Notepad or GEdit) and remove the column headings seen there; also, save the file before closing.
4) Go into phpMyAdmin and select the table into which you wish to import the data, then click on the Import tab
5) Select your file for importing and choose "CSV using LOAD DATA". Also, in the "fields terminated by" box take out the default semicolon and put a comma there.
6) Empty the "fields enclosed by" and "fields escaped by" boxes, too.
7) Click "Go"
I tried this myself just a minute ago and it worked without a problem.

I may be misunderstanding your question, since you stated "through php".

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.