Forum Moderators: open

Message Too Old, No Replies

Allowing users to import excel into phpMyAdmin (or other DB software?)

         

jeremydt

8:44 pm on Oct 9, 2006 (gmt 0)

10+ Year Member


Does anyone know of a simple way to import excel files in phpMyAdmin? My problem is that excel saves my CSV files without quotes around the fields, and phpMyAdmin isn't happy when there are quotes or some other character to enclose the fields.

I'm trying to allow people who use my database to import files from excel using phpMyAdmin. I could write a Perl script or use the 'replace' feature in notepad or something to put quotes in, but I need a way that people can use with just a mouse click. (Hopefully short of writing my own Php script).

Thanks

volatilegx

2:46 pm on Oct 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld jeremydt :)

> (Hopefully short of writing my own Php script).

Unfortunately I think that's what you're going to have to do. That's what I've always done.

spinnercee

8:47 pm on Oct 11, 2006 (gmt 0)

10+ Year Member



Whatever you use should be able accept a file upload from the user (a text box on a form could work as well, but they are often size limited) -- once you have the csv it can be written to disk so that any routine that can insert into your database can process it.