• 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

saving a html file as word document on click of a button

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
is it possible to save a html file to a word document on the client side on click of a button?
I have a SAVE button on a web page. I need to save its contents into a word document on click of the save.
Help gr8tly appreciated/
Thanks
Arvind
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is going to have to be some sort of server side code to the best of my knowledge.
 
Sheriff
Posts: 67650
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eric is correct. Your best bet would be to, upon the click of the button, post a request ot a servlet that would output you page with a content type of RTF and marked as an 'attachment'. Search these forums for 'attachment' for the exact sytnax, I don't recall it off the top of my head.
RTF is a text-based markup that Word will understand. It's a lot easier than trying to create the proprietary and ever-changing binary Word format.
There are also 3rd-party libraries that might help you create Word files if RTF is not suitable. But in all cases, this involves server-side processing.
hth,
bear
 
reply
    Bookmark Topic Watch Topic
  • New Topic