# How to generate DOC files in Rails

**URL:** <https://www.ruby-forum.com/t/how-to-generate-doc-files-in-rails/149940>\
**Category:** Rails\
**Created:** [October 1, 2008, 11:57am UTC](https://www.ruby-forum.com/t/how-to-generate-doc-files-in-rails/149940 "2008-10-01T11:57:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rorchild](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecc23a/32.png) [@rorchild](https://www.ruby-forum.com/u/rorchild)\
**Post date:** [October 1, 2008, 11:57am UTC](https://www.ruby-forum.com/t/how-to-generate-doc-files-in-rails/149940/1 "2008-10-01T11:57:47Z")

</div>

Hi All,

```
How to generate DOC files in Rails like CSV. is there any plugin ,

```

please advise me.

```
   Thanks in Advance.
```

---

<div class="post-metadata">

**Author:** ![rorchild](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecc23a/32.png) [@rorchild](https://www.ruby-forum.com/u/rorchild)\
**Post date:** [October 1, 2008, 2:05pm UTC](https://www.ruby-forum.com/t/how-to-generate-doc-files-in-rails/149940/2 "2008-10-01T14:05:11Z")

</div>

Microsoft Word is a proprietary file format unlike csv, rtf, pdf

if you have a windows server and have Microsoft office installed, you  
can use ruby with win32ole to automate the generation of word document.

on linux there are some libraries(ported from perl and python) which can  
generate xls(not sure about word doc), but even then when you open them  
in the application it asks for converting them to right format.

I would suggest generating rtf files

regards  
Senthil N.

[http://blog.railsfactory.com](http://blog.railsfactory.com)

related urls:

> **[Automating Word with Ruby: The Document Object](http://rubyonwindows.blogspot.com/2007/04/automating-word-with-ruby-document.html)**
>
> In a previous episode , we discussed the Word application object and looked at some of its properties and methods. Now we'll take a look at ...

[http://rubyforge.org/projects/ruby-rtf/](http://rubyforge.org/projects/ruby-rtf/)

Ror Child wrote:

> Hi All,
> 
> ```
> How to generate DOC files in Rails like CSV. is there any plugin ,
> 
> ```
> 
> please advise me.
> 
> ```
> Thanks in Advance.
> 
> ```
