-2

I have a requirement in Java (Spring) to read data from an Excel spreadsheet and store it in MySQL database. More specifically, I have to read one row of data from an Excel spreadsheet every 5 minutes and store it to a MySQL database.

Can anyone help me how to do this?

stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
shamkuma
  • 3
  • 1
  • 5
  • 1
    Possible duplicate: http://stackoverflow.com/questions/6516705/how-to-import-excel-file-in-mysql-using-odbc-in-java – Taz Apr 28 '12 at 07:14
  • This appears to be very similiar to [3621798](http://stackoverflow.com/questions/3621798) or [8031193](http://stackoverflow.com/questions/8031193) – arober11 Dec 02 '12 at 23:28

1 Answers1

1

As Mathias Schwarz wrote:

You can read an Excel file in Java using the Apache POI library: http://poi.apache.org/ There are some code samples on their howto page which will tell you how to read an Excel file: http://poi.apache.org/spreadsheet/how-to.html

To store the data you can use the JDBC driver for MySQL. You can get the connector here: http://www.mysql.com/products/connector/

Vitaly Olegovitch
  • 3,509
  • 6
  • 33
  • 49