On Mar 25, 2015, at 1:20 AM, Ganesh Ranganathan 
<ganesh.ranganathan...@gmail.com> wrote:
> 
> Can you suggest a good gem for generating word files from Rails. The main 
> requirement is to replace some sections inside an existing template in rails.

1) You might want to use RTF templates instead. It's a format you can more 
easily search for your markers and modify, and Word will open it directly.

2) If RTF is insufficient, you might consider Word + VBA, and use Word's actual 
scripting to fill in the templates. (Perhaps also OpenOffice or a derivative.)

3) Perhaps there's something in the OpenOffice libraries which could be wrapped 
up into a  gem to do what you want.

> I used docx_replace, but found that it's not always replacing the variable 
> names with the template values. 

Note the second sentence in the description of docx_replace: "This is 
purposefully meant to be simple and feature-light."

The specification of the docx format is over 7,000 pages--"simple" and 
"complete" are incompatible goals when dealing with docx.

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice





-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/EAD7D9BF-1EEA-42DB-8ED4-1086FCC2B675%40elevated-dev.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to