I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-06-18 20:21:45.519876-07 by jaiguevara in response to 12782
Re: spreadsheet optimization
Looks like there's no way to set type or style on multiple table cells. The following - getting cell rows and indexing vs getTableCell is much faster. Not a lot of examples out there so maybe this can help someone.
my $doc = odfDocument(file => $output_file, create => 'spreadsheet'); my $sheet = $doc->expandTable(0, $Rows, $Columns); my @tblrows = $doc->getTableRows($sheet); my $X=0; my $Y=0; for my $row ( @$result_rows ) { #DBI fetchall_arrayref results my $tblrow = $tblrows[$X]; my @cells = $doc->getRowCells($tblrow); #get open cells for 1st row for my $fld(@$row) { $doc->cellValueType($cells[$Y], "$type"); $doc->cellValue($cells[$Y], "$fld"); $doc->cellStyle($cells[$Y], "stylename"); } }
Direct Responses: Write a response