What is the best way to programmatically output a Word document file format in Ruby?

I need to output a file in Word document format from a Ruby-based web application (Rails / Sinatra) based on some text content in the application. Is there any library support in Ruby for creating and structuring a Word document?

+4
source share
3 answers

You do not specify what the word document means. Is this a Word 2003 style document file? Is this a Word 2007 docx file? Is this something that Word can open up than style support?

If the latter is what you want, you can use RTF, which is somewhat simpler than the document format. There is a library called Ruby RTF that should do what you want, although I honestly never used it myself.

+2
source

It would be easier to generate a Word 2003 document: is there a more understandable file format for the basic Word 2003.doc that does not require PhD in XML, etc.?

0
source

All Articles