View Full Version : Importing Excel Spreadsheet data to MySQL
Greetings All,
I am trying to import data from an excel spreadsheet into the mysql db directly from the spreadsheet. I have a plug-in on the spreadsheet (Excel to Mysql Import, Export and Convert) that ask for username, password and server host. We I input everything and click connect, I get an error message asking for username, password amd server host.
My question is.....does anyone here know how I can get this spreadsheet to connect to the db through this plug-in??
Thanks in advance
Simple answer: Can't Be Done.
Powweb doesn't allow remote connections (from your PC) to their MySQL databases
Of course there's other possibilities - depending on how adventurous you are.
You could change your plugin to ftp a csv file of the data to a holding directory and then use a cron job to process any files it finds there (importing, deleting and emailing results of conversion)... but that's easier to describe in one sentence than it is to program from scratch. ;)
Does your plugin support writing the sql file to your local harddrive? You could then upload it to PW and import it from there.
Alternatively, I have seen an option in the phpmyadmin to import cvs (was ist cvs?) files written out by Excel. I have never tried it.
Worst comes to worst, install XAMPP (http://www.apachefriends.org/en/xampp.html)
start it. Create a DB (http://localhost/phpmyadmin).
You now have a mysql database running on your local machine. Connect your Excel to this one (root@localhost/mydb or something like this).
Then make a database dump (mysqldump) or export it via phpmyadmin from your local machine and import it to PW.
Its a lot of work though, I would try the CSV option first, unless you have XAMPP running anyways.
Its a good Idea to have it, since you can do all design and test it at home before putting it online to your live website.
Andre
http://www.aguntherphotography.com
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.