Search code examples
perlmodulereportdoc

Perl module for generating .doc or .docx document files


Perl is famous for having lots of modules for almost any programing task can occur while programming on it.

But is there any module that can generate .doc (.docx) files? Assume there is huge business entity and some text/number data that describes it should be saved to formatted .doc file for MS Word.

I need something like report generator (Might be similar to Template Toolkit but to make .doc files).

Do you know any module or library to be called from perl doing this kind of things?


Solution

  • Interoperability with Microsoft is impossible through this venue. They have no spec that reflects reality. They themselves do not conform to the spec they published. The spec they published subverted the International Standards Organisation process with backdeals and bribes. You should refuse to deal in this matter.

    But if you don't care about that and have to work to finish, use the RTF writer or HTML writer, which are formats that Word can import. Joel Spolsky writes about other venues of interop on his blog: Why are the Microsoft Office file formats so complicated? (And some workarounds)