List Info

Thread: Generate Excel in memory




Generate Excel in memory
user name
2006-10-16 12:43:41
The module's documentation for the new() method calls what
you want to do "writing a file to a scalar" and
shows the following example:

<code>
    # Requires perl 5.8 or later
    open my $fh, '>', my $str or die "Failed to
open filehandle: $!";

    my $workbook  = Spreadsheet::WriteExcel->new($fh);
    my $worksheet = $workbook->add_worksheet();

    $worksheet->write(0, 0,  "Hi Excel!");

    $workbook->close();

    # The Excel file in now in $str. Remember to binmode()
the output
    # filehandle before printing it.
    binmode STDOUT;
    print $str;
</code>


To write a respons, access
http://ww
w.cpanforum.com/response_form/3265

To see the full thread, access
http://www.cpan
forum.com/threads/3011

--
You are getting this messages from www.cpanforum.com
To change your subscription information visit http://www.cpanforum.
com/mypan/

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )