Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Export data to Microsoft Word

Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am stuck with a problem. My application is getting some data from database(Oracle) like name,age,sex,qualification etc. in a jsp page. There is a link in jsp page "Export to Word". My requirement is that when I click "Export to Word", A word file should open with a predefined format, i.e, A logo on top, a table and a footer. Table in word should be pre-populated with the data that I am getting from oracle.User should be able to use this word file as normal word file so all the tool bars of word should be visible to him.
In nutshell, We are providing the user with a word document that has a predefined format(Images and footer) and the values in the table of word document, that are coming from database. After that user should be able to use it as normal word file.
Please suggest how we can do this functionality using Java or Jsp or Servlet or any other java related technology. Please help as it is very urgent.
Thanks in Advance.
Posts: 43027
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Word documents can be created with the POI library. It's not being maintained anymore, but if your documents ar simple it may work for you. RTF might be an option as well, for which I'd recommend the iText library. Links to both libraries can be found on the AccessingFileFormats wiki page.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic