• 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

Exporting webpage to .doc

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

I am trying to export what is displayed on a page to a .doc file when the user clicks an "Export" button. I am really not sure where to start with this as I am fairly new to javascript. I have been manually copy/pasting the page into a Word document, and ran into a few problems even with that. My tables display correctly in Word, but I have some text in a row that can either be hidden or visible (display: none, display: block) and is toggled by a link. When I copy the page over to Word, it brings along the hidden text, which I don't want. The page is used to generate reports which may later need to be editted, and the hidden text is just a feature of the webpage to aid the user and not needed for the report. So my question is how do I take only what is VISIBLE on a page (or ideally a particular frame) and export it to another format? Thanks!
 
author & internet detective
Posts: 41919
910
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adam,
To export to Word, you need to go to the server. You can't do it in JavaScript alone. On the server you could use a library to write out a doc file. I like Apache POI.
 
Adam Reber
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply Jeanne. I'll look into Apache POI.
reply
    Bookmark Topic Watch Topic
  • New Topic