Forum: Ruby Generating Microsoft word document using ruby or rails.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
79822418fa28a908ca75b67de3b31b3c?d=identicon&s=25 Prabu Jayaraman (jprabu)
on 2009-02-20 06:48
I have some record formatted in table. For that, I need to convert the
table data into Microsoft word document or Open office document. what
method I have to use?,

Is there any class or gems or library in ruby?

kindly help me?....



Thanks,

Prabu J
3cb4fdcf13aad6a7dcae83876b0e784e?d=identicon&s=25 Josef 'Jupp' Schugt (Guest)
on 2009-02-20 11:09
(Received via mailing list)
* Prabu Jayaraman, 2009-02-20, 14:47:

> I have some record formatted in table. For that, I need to convert the
> table data into Microsoft word document or Open office document. what
> method I have to use?,

The easiest way is to write a CSV and then import it into the target
application. With Openoffice this simply means that you write the data
(using file access or simple redirect) to a file with the name ending in
".csv" then open the file. You will be presented with an import
dialogue. Choose 'Separated by Tab'. The Data will be converted into a
spreadsheet. The same method should work for MS Office but I am not
familiar with that software.

Josef 'Jupp' Schugt
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (Guest)
on 2009-02-20 11:52
(Received via mailing list)
2009/2/20 Josef 'Jupp' Schugt <jupp@gmx.de>:
> dialogue. Choose 'Separated by Tab'. The Data will be converted into a
> spreadsheet. The same method should work for MS Office but I am not
> familiar with that software.

Another easy way I can think of is this: create a document with the
desired contents, write it as RTF. Analyze the RTF and write a program
that outputs the same content (with multiple table rows of course).

Cheers

robert
This topic is locked and can not be replied to.