• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Program to export to Excel

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?

 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
no wonder he is so sad, he hasn't seen this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic