Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I was finding automatic .csv file converter to web based to put the .csv file report as web based. but i can't find one. instead, i found one system which is taken MySQL database and show the report.

Now what i need is a tool which automatically convert a .csv file to MySQL and the other tool will take the MySQL file and show as report.

What opensource web tool you recommend?

Thanks,

share|improve this question
    
Isn't this a duplicate? webmasters.stackexchange.com/questions/14514/… –  ripper234 Nov 10 '11 at 14:26
add comment

1 Answer

up vote 6 down vote accepted

There are few ways to import CSV into MySQL DB:

1. Manually using phpMyAdmin -- select DB, table and choose "Import".

2. MySQL can even use CSV as database storage engine (work with CSV file directly) -- but this is not recommended to use it extensively as performance is not that great -- but enough for reading data from it occasionally. The CSV file has to use specific row/column delimiters.

Official documentation: http://dev.mysql.com/doc/refman/5.1/en/csv-storage-engine.html

3. Executing this sort of SQL command (you just need to do a little bit of coding to implement this as a webpage/script):

LOAD DATA LOCAL INFILE "xxx.cvs"
INTO TABLE xxx
FIELDS TERMINATED BY ','
ENCLOSED BY '\"'
LINES TERMINATED BY '\n'

Official documentation: http://dev.mysql.com/doc/refman/5.1/en/load-data.html

4. Code your own script that will read data line by line from CSV file and convert them into SQL commands (INSERT INTO ...).


You are asking for already existing open source solution -- phpMyAdmin is a perfect example. It is more that just an import script -- it is widely used by manage MySQL databases, but it does what you need -- import data from CSV file into MySQL DB.

Unfortunately I do not know any Open Source reporting web-based tool -- if I need a report I will code it myself.


If you search for CSV 2 MySQL a bit, you will see quite a lot PHP-based scripts available. Some of them are free and some cost some money; some will be able to handle any CSV format (row delimiter, column delimiter, non-ascii characters etc) while other may only handle a limited variation.

share|improve this answer
    
@LazyOne... that is a great resource. I use that everyday. –  TikaL13 Aug 16 '11 at 16:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.