• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to upload the Excel to Database

 
pankaj patil
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
how can i upload the data of the table to the excel file through the code

thanks
Pankaj
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would start by looking at:
http://jakarta.apache.org/commons/fileupload

If you're going to send the actual .xls file to the server, you will need a third party library to work with it, such as:
http://jakarta.apache.org/poi/

Another alternative is to have the user export the excel data to csv format (which is just delimited text) and send that file.
You will be able to parse that with java's File and String classes.

What I don't know (someone else might) is if Excel is capable of performing HTTP Posts. If so, that might be an avenue for you to explore.
 
pankaj patil
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply

I want the data of the table to be stored in the excel using java code i dont want the file to uploaded to the server.

With Regards
Pankaj
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pankaj,
I'm not really sure what it is you're trying to do.
Can you explain your requirements in a little more detail?

Are you just trying to get your page to display in Excel?
 
pankaj patil
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply

in jsp page the data is display which i want it to uploaded to the excel file.

With Regards
Pankaj
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pankaj,

I'm still having a hard time understanding what you mean.
Please describe, step by step what you're trying to do.
Where is 'the' Excel file?

You said "...uploaded to the excel file".
From your description, I would assume that you mean there is an Excel file on the server that you want the user to be able to append with data from an HTML table being displayed on their screen.
I suspect that's not what you mean.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!