in reply to Re: OLE write to Excel
in thread OLE write to Excel

I an using the Win32::OLE. Is this module not as good as the other modules to use with Excel? Thanks again for the quick response.

Replies are listed 'Best First'.
Re^3: OLE write to Excel
by marto (Cardinal) on Jan 20, 2011 at 15:49 UTC

    Hi NewMonk2Perl, Welcome to the Monastery.

    In the Perl community from time to time you'll hear/read "TMTOWTDI", meaning There's more than one way to do it. Have you seen the module Spreadsheet::WriteExcel? You can use it to create Excel documents on various platforms, you don't need excel installed. It has great documentation and Examples.

    #!/usr/bin/perl use strict; use warnings; use Spreadsheet::WriteExcel; my @mydata = ( ['Item', 'Category', 'Price'], ['Nails', 'Hardware', '5.25'], ['Shirt', 'Clothing', '23.00'] ); my $workbook = Spreadsheet::WriteExcel->new('test.xls'); my $worksheet = $workbook->add_worksheet(); $worksheet->write_col('A1', \@mydata);

    If you're new to Perl I'd suggest working through the following:

    Update: I'll leave the formatting of the cells as an exercise for you, it's covered in the Documentation and the examples.

    Update 2:Thanks toolc s/next/need/

      Thank you for all the help and links to help me learn Perl. This is awesome information. There is just so much info on the net, its hard to seperate the good information from not so good information. Thanks again, Paul
Re^3: OLE write to Excel
by Ratazong (Monsignor) on Jan 20, 2011 at 16:08 UTC

    I am using Win32::OLE for automatization of my Excel-tasks, and it works fine for me :-) . The main drawback of the module is that it requires Windows (and in my case also Excel) to be installed - so your scripts are not very portable.

    HTH, Rata
Re^3: OLE write to Excel
by toolic (Bishop) on Jan 20, 2011 at 15:50 UTC
    Is this module not as good as the other modules to use with Excel?
    I have no idea how Win32::OLE compares to other CPAN offerings since I have never used it. For what it's worth, it has received positive reviews.