Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

xxx vdirso, xxx vdirso, apache presents wrong cert, html_entity_decode xss, patrick qarout, mdadm rebuilds every reboot, upbohj, anything, how to set cpan to go through a proxy, openssl error reason 1046

Links

Issociate
Impressum

#1: Creating Microsoft Word Document with Perl

Posted on 2004-11-02 13:28:41 by Rok Jaklic

Hi.

Is there any way to create Microsoft Word Document (.doc) with Perl; without
installed Microsoft Word and Win32::OLE?

Best regards,

Rok


--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Report this message

Mr Ad

Google

#2: Re: Creating Microsoft Word Document with Perl

Posted on 2004-11-02 13:49:25 by Gary Stainburn

On Tuesday 02 November 2004 12:28 pm, Rok Jaklic wrote:
> Hi.
>
> Is there any way to create Microsoft Word Document (.doc) with Perl;
> without installed Microsoft Word and Win32::OLE?
>
> Best regards,
>
> Rok

Hi Rok.

Not a direct answer to your question, but.....

Does it need to be a .doc?

When I had to create documents I found it easier to create a .rtf file
instead. RTF supports most of the formatting features you're likely to
require and and much more portable.

There are a number of modules on CPAN for creating RTF files, but I
didn't even need those. I simply created the blank letter in
OpenOffice putting placeholders where I wanted to insert text and then
simply used that as a template for my perl prog - I was using it to
extract data from our company management system written in COBOL to
create pre-mailmerged documents (having a mailmerge/datasource and
using Word to do the mailmerge took too long!!!)

--
Gary Stainburn

This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000


--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Report this message

#3: Re: Creating Microsoft Word Document with Perl

Posted on 2004-11-02 14:39:47 by Jenda Krynicky

From: Gary Stainburn <gary.stainburn@ringways.co.uk>
> On Tuesday 02 November 2004 12:28 pm, Rok Jaklic wrote:
> > Hi.
> >
> > Is there any way to create Microsoft Word Document (.doc) with Perl;
> > without installed Microsoft Word and Win32::OLE?
> >
> > Best regards,
> >
> > Rok
>
> Hi Rok.
>
> Not a direct answer to your question, but.....
>
> Does it need to be a .doc?
>
> When I had to create documents I found it easier to create a .rtf file
> instead. RTF supports most of the formatting features you're likely
> to require and and much more portable.

I agree RTF is good enough. And you can even give it .doc extension and the users will not see any difference.

> There are a number of modules on CPAN for creating RTF files, but I
> didn't even need those. I simply created the blank letter in
> OpenOffice putting placeholders where I wanted to insert text and then
> simply used that as a template for my perl prog - I was using it to
> extract data from our company management system written in COBOL to
> create pre-mailmerged documents (having a mailmerge/datasource and
> using Word to do the mailmerge took too long!!!)

This is fine only as long as
1) the editor doesn't put any RTF codes inside the placeholders
2) you do not need loops or conditionals in the template or the
repeated/optional part contains as many opening as closing curlies.

The curlies are actually rather annoying once you start using
loops/conditionals. So you might want to try a module instead. Eg.
http://jenda.krynicky.cz/#Template::RTF

Jenda
===== Jenda@Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Report this message

#4: Re: Creating Microsoft Word Document with Perl

Posted on 2004-11-03 16:00:43 by Rok Jaklic

Thank you both for usefull information.





--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>

Report this message