Re: Generating Microsoft word document using ruby or rails.



2009/2/20 Josef 'Jupp' Schugt <jupp@xxxxxx>:
* 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.

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

--
remember.guy do |as, often| as.you_can - without end

.



Relevant Pages

  • Word 2003 RTF Mail Merge Data Source Woes...
    ... automatically from RTF templates by writing out the reference to the ... CSV data source directly in the RTF document as we create it, ...
    (microsoft.public.word.mailmerge.fields)
  • Re: any path from Applix Words to OpenOffice?
    ... Open your Applix document and a new Open Office document ... go the RTF or Oxygen Office route. ... preserves formatting a little better than going through RTF. ...
    (comp.os.linux.misc)
  • Re: any path from Applix Words to OpenOffice?
    ... Open your Applix document and a new Open Office document ... go the RTF or Oxygen Office route. ... preserves formatting a little better than going through RTF. ...
    (comp.os.linux.misc)
  • Re: MS Works reader
    ... Rob Kendrick wrote: ... as RTF or CSV. ... Trouble is - most people these days using MS Works these ... had to remind him each time to export as RTF. ...
    (comp.sys.acorn.apps)
  • Re: Generate rtf file
    ... >> I search a soft that allow conversion from doc, html or csv to rtf, ... > Word itself will write an RTF file. ... > CSV, then it can save as RTF. ...
    (comp.publish.prepress)