Performance

Topics: User Forum
Aug 18, 2009 at 1:51 PM

Hi,

Is it normal that performance dramatically slow down when a sheet has a few thousands rows and a script try to set the styles of a few hundreds of them?

 

Thanks

Developer
Aug 18, 2009 at 3:57 PM

>> Is it normal that performance dramatically slow down when a sheet has a few thousands rows and a script try to set the styles of a few hundreds of them?

How are you styling the rows? Here are some tips:

// FAST IN PHPExcel 1.7.0
$objWorksheet->getStyle('A1:K100')->...

// SLOW IN PHPExcel 1.7.0
for ($row = ...) {
    for ($col = ...)
        $objWorksheet->getStyle($col . $row)->...
    }
}

// FAST (PHPExcel 1.7.1 (try latest source code))
$objWorksheet->getStyle('A:K')->...