Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
I know it is very silly question but i have no idea in this issue, i am having exe file for perl source code which will convert excel into pdf and ll send the mail with pdf attached. All works fine. When i run this tool it works well and no problem at all. The problem comes when i run the tool in the system which contains Excel 2003. It runs very slowly in those systems. So my question is, if the system contains Excel 2000 and Excel 2003, is it possible to choose the lower version of Excel for running the tool using Win32::OLE or by any other way.

Replies are listed 'Best First'.
Re: Version issue
by aquarium (Curate) on Mar 31, 2006 at 13:21 UTC
    it is more than likely that the systems you speak of have either excel 2000 or excel 2003 installed, but not both, therefore you cannot choose another to use for the OLE. in the spirit of (most) software, it's been getting more and more bloated, taking up more processor time...hence why (i think) you excel 2003 installed machines are running it slower (if hardware and OS is same)
    the hardest line to type correctly is: stty erase ^H
Re: Version issue
by Anonymous Monk on Mar 31, 2006 at 15:13 UTC
    You can specify the version of Excel you want by appending the version number to the object you're creating. e.g.
    my $excel = CreateObject Win32::OLE 'Excel.Application.10' or die $!;

    If memory serves, Excel 2000 is Version 10, and Excel 2003 is Version 11.
Re: Version issue
by roboticus (Chancellor) on Mar 31, 2006 at 17:50 UTC
    Anonymous Monk--

    Have you looked at the Spreadsheet::ParseExcel module? Perhaps it will do what you need. I frequently use the WriteExcel module, and find it to be very useful. Especially since I tend to run on Unix systems, which Excel doesn't run very well on... 8^)

    --roboticus