Using posgresql along with java to work on an xls file

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
Afif_D
Posts: 184
Joined: Wed Oct 06, 2010 2:56 pm UTC

Using posgresql along with java to work on an xls file

Postby Afif_D » Thu May 22, 2014 7:07 am UTC

I have an xls database. I wish to build a database using posgresql and also use Java to make the queries. I have no idea where to start. Pls help
Image

Volcano99
Posts: 56
Joined: Wed Dec 16, 2009 10:10 pm UTC
Location: 350 km SW of The Castle

Re: Using posgresql along with java to work on an xls file

Postby Volcano99 » Thu May 22, 2014 10:42 am UTC

Is there any reason you want/have to use PostgreSQL and java specifically? Other tools like SQLite3 and Python might be a better fit - specially SQLite, which is orders of magnitude easier to install and manage.

To convert the xls to a PostgreSQL database, you should use a common intermediate format, like CSV. You can convert the XLS file to CSV using the save as... menu in excel or openoffice, choosing 'CSV (comma delimited)' as the save format.

Then, you can import the table to postgres or SQLite.

Some pointers:
http://office.microsoft.com/en-001/exce ... x#BMexport (excel save as csv)
http://stackoverflow.com/questions/2987 ... gres-table (import csv to postgresql)
http://stackoverflow.com/questions/1045 ... nto-sqlite (import csv to sqlite)
http://zetcode.com/db/postgresqljavatutorial/ (tutorial on postgres and java)


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 11 guests