-1

I would like to do project which retrieves the information of the student.In this i would like to use MS-Excel as a background database to the Java Swing user interface.How can I achieve this?

  • 5
    Unless there is a good reason to use Excel, I would consider other, simpler options. Java-Excel interaction is not always straight-forward and Excel is not meant to be used as a database. – assylias May 27 '13 at 09:22
  • 2
    You shouldn't. Seriously. There are so many light weight, single user databases solutions available its simply not funny and a hell of a lot easier then trying to query a spreadsheet. If you need to produce reports, JasperReports can output data to excel – MadProgrammer May 27 '13 at 09:24
  • Take a look at [HSQLDB](http://hsqldb.org/) or [H2](http://www.h2database.com/html/main.html) which are both native Java database that can operate in single user mode – MadProgrammer May 27 '13 at 09:31

1 Answers1

1

First I should state that if you just want a background database, Excel is your second worst option(the worst option is raw CSV). You already got some offers in the comments, and I would like to add SQLite.

The only reason I can think about to use Excel as a database is if you already have an Excel file as your source of input, and you want to query it. If this is the case, you can use Microsoft's drivers to connect to the Excel file. The connection string depends on the format:

Idan Arye
  • 12,402
  • 5
  • 49
  • 68