• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we use Excel file as a database in java?

 
prathamesh bandivadekar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There,

Can we access Excel file java code as a database?

Thanks in advance!
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can, yes. But you shouldn't, no.

Excel isn't a database. It's a spreadsheet. Accessing it as a database would only lead to trouble. Use the appropriate API to interact with Excel files. Commonly used one is Apache POI HSSF/XSSF.

Alternatively, if your sole purpose is to have an embedded database in your application, then look for JavaDB (included since JDK6), Derby (its predecesor) or Hypersonic. No, MSAccess is not a good alternative, no.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excel as a database

Sorry, couldn't resist :-) It is possible; googling for "excel jdbc" will provide you with lots of starting points.
 
Jan Cumps
Bartender
Posts: 2608
14
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<duckingforcover>
On the other hand, this is the very moment in your carreer where you can make the difference.
Suffer the pain to get it done, ignore the voice in the back of your head that is nagging you,
and deliver a smart and well designed interface.
Delivering it might create goodwill that allows you to get your way on other decisions.
</duckingforcover>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic