Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Program to export to Excel  RSS feed

 
Bhaskar Chandrasekaran
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP and Java program which will read data from Excel and add them dynamically to create table.
My requirement is i should able to edit the columns what ever the data that was fetched from Excel and export those contents to another excel file.
This should happen on clicking a button, i mean to exporting the contents of the table.
Can some one please help me?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some comments and questions, in no particular order.

a) JSPs don't access files (or do any kind of I/O), so I assume by "JSP and Java" you mean you have some backing beans and servlets to accomplish those parts, structured in a MVC fashion.

b) By "table", do you mean a DB table, or a tabular GUI element in a web page?

c) By "I should be able to edit", do you mean manually, on a web page? If so, it seems easier if the user would just use a desktop spreadsheet app to do his edits, and then upload the resulting file. Why duplicate all that on a web page?
 
Bhaskar Chandrasekaran
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There won't be any DB concepts here....By using JSP and Servlets we need to accomplish this.
Once the data is added dynamically from excel , the values in the JSP file should be editable.
I mean the cell values should be editable.
Please let me know how to accomplish this...
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, that still leaves:

c) ... it seems easier if the user would just use a desktop spreadsheet app to do his edits, and then upload the resulting file. Why duplicate all that on a web page?
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Ulf that you seem to be making it more difficult by doing it backwards. Instead of adding the data from Excel to your web app and then editing it, why not edit it in Excel and then add it to the web app?

In any case, if you really must do it this way, look at the jQuery plugin called DataTables and it's add-on call jEditable. That will let you edit in place, spreadsheet style.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!