wood burning stoves 2.0*
The moose likes Servlets and the fly likes Working with dynamic excel files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Working with dynamic excel files" Watch "Working with dynamic excel files" New topic
Author

Working with dynamic excel files

Preeti Chopra
Greenhorn

Joined: May 14, 2001
Posts: 5
Hi all,
I am working on a project where in the client downloads an excel file, fills the data in the excel file and submits it back to the webserver thru browser. Now the problem is that there are multiple excel files which need to be accessed by different users, depending upon their needs. These excel files are mostly related to the location where the user is accessing data from.
I am planning to use JDBC ODBC bridge. I am looking for some way to create a common DNS for ODBC link for all Excel files. Is it possible?
Thanx in advance
Preeti
Johnson johney
Greenhorn

Joined: May 14, 2001
Posts: 2
Prethi,
Sorry, I am not answering your question, but rather I am asking you. Since you have already worked on the above topic ie, downloading Excel and pushing it back to the server, can you just tell me how to go about it.

Thanks,
Johnson
------------------
Preeti Chopra
Greenhorn

Joined: May 14, 2001
Posts: 5
Hi Johnson,
This piece of code can help u to download any file from ur server, not necessarily Excel file.
<HTML>
<A HREF="/pathname/blablabla.xls">Excel File</A>
</HTML>
And this piece can help u put the file back.
<HTML>
<FORM NAME="name of the form" METHOD="POST" ACTION="ur servlet here if u want to do some proceesing with the excel file">
<input type="file" name="naam" size="30">
<hr>
<INPUT TYPE = "SUBMIT" VALUE = "Load File" NAME="loadFile">

</FORM>
</HTML>
Regards
Preeti
Johnson johney
Greenhorn

Joined: May 14, 2001
Posts: 2
Hi Preeti,
Thank you for your reply. But actually my requirement is like this, I need to display the data that comes from the database in an excel file, and then I need to put back the same data into the database.
Anyway thanks a lot.
Johnson

------------------
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Why do you want to store the same data back to db? What's the purpose? I think there must have been some modification made by some one. Or is this your case? There is a temp data stored in one db, get the report as excel , show to user, user comfirms to store in another table/db as permanent. (Like PayRoll entries..)
Didn't quite get your need Jhonson.

Preeti, Offhand nothing comes out my head. I keep in mind. If I get any solution post it here.
regds
maha anna

[This message has been edited by maha anna (edited May 16, 2001).]
Smita Tyagi
Greenhorn

Joined: May 09, 2001
Posts: 21
Hello Johnson,
If you don't want the user to cmake change to your DB why don't you show data in XML sheets?
Smita
edmond so
Greenhorn

Joined: May 17, 2001
Posts: 6
here's 2 ideas:
1. with ms's odbc driver for excel, you can specify a directory as the datasource, where each xls in this dir is a table in the db. this only works for older versions of excel files - i think version 3 or 4.
2. if you want to get around setting up a dsn for each xls file, u can use a dsnless connection
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Working with dynamic excel files