Skip site navigation (1) Skip section navigation (2)

Re: export to excel format

From: jmcnamara(at)cpan(dot)org (John McNamara)
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: export to excel format
Date: 2003-04-11 22:05:34
Message-ID: 8cceb2da.0304111405.26ecc247@posting.google.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
bruno(at)wolff(dot)to (Bruno Wolff III) wrote:

> I wrote a perl program that gets data from
> the database and writes excel spreadsheets. It uses Spreadsheet::WriteExcel
> which you can get from CPAN. It seems to be pretty slow. It takes about
> 3 minutes to produce a 4MB spreadsheet.


Are you sure that the delay is caused by Spreadsheet::WriteExcel. The
following program produces a 4MB file in 3 seconds on a P700:


    #!/usr/bin/perl -w

    use strict;
    use Spreadsheet::WriteExcel;

    my $workbook  = Spreadsheet::WriteExcel->new("4mb.xls");
    my $worksheet = $workbook->addworksheet();

    for my $row (0 .. 8_100) {
        $worksheet->write($row, 0, "Test string " x 20);
        $worksheet->write($row, 1, "Test string " x 20);
    }

    __END__


John.
--


In response to

Responses

pgsql-interfaces by date

Next:From: Juraj FedelDate: 2003-04-11 22:43:40
Subject: Re: [ADMIN] PLEASE HELP ME URGENT about choosing only the ones
Previous:From: Zeugswetter Andreas SB SDDate: 2003-04-11 16:29:15
Subject: Re: Speed of SSL connections; cost of renegotiation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group