Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

From MS EXCEL to the Database -- is it possible?

 
Steven Sega
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)I have done this easily: query an Oracle or whatever database and present the data in MS Excel format to the client.
ps. and we all know we can save this to hard disk as a flat file -- super duper easy program which we can write with our eyes closed.
2)This is my problem: from a client in MS Excel -- can the client save to the Oracle database?
Uuuh. My initial reaction to no.2 was -- that's impossible. Then I thought of asking people here at javaranch. If no. 2 is possible -- How can I do it?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you'll get more help on this in a forum that deals more with databases... So I'm moving it to the JDBC forum...

-Nate
 
Kenneth Reising
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some of the people where I work use the OraXcel ( http://www.oraxcel.com) product and been happy with it. It is reasonablly priced, but that is about the extend of my knowledge on it.
Else I'd imagine you could do some ODBC bridge into Oracle magic, (which is probably how you got Oracle into Excel).
You might also try poking around on Google some:
http://www.google.com/search?q=oracle+excel
 
Paul Bailey
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you try to restate the problem?
I think you want the user to "save" an excel file and have information popup in your db instantly.
If there is only one client, make the excel file an ODBC database and go from there.
If there are many clients, things are more trickey, you might want to get a comercial package.
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may not be what you're after but I'll make a stab at it anyways:
Have the client save the excel spreadsheet as a *.csv file. Have a java program that takes a *.csv file as a parameter, read each line using file io, parse each column value using StringTokenizer, then write each line to the database.
I have tried using JDBC-ODBC, to read the excel files, then update the Oracle DB but I found that setting up every client to work was more pain that it was worth. besides, the file io method was a lot faster.
Another method is to invoke SQL Loader to import the file.
All the above methods have an extra step the user has to do before the data can be written to Oracle. So this may not suit you because you don't click save from Excel.
Jamie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic