Formatted sheets creation in Loop

Topics: Developer Forum, User Forum
Dec 2, 2013 at 5:07 PM
Hi!, I'm working on a page that loads data from a Table in Oracle and exports to Excel, the problem is that, when i format the sheets, it only applies the format to the first 16 sheets in the loop, this is my code:
$styleArray = array(
    'font'  => array(
        'bold'  => true,
        'color' => array('rgb' => 'FFFFFF'),
        'size'  => 11,
        'name'  => 'Verdana'

        ->applyFromArray(array('type' => PHPExcel_Style_Fill::FILL_SOLID,
        'startcolor' => array('rgb' => '00AA00')

$styleArrayBorder = array(
       'borders' => array(
             'outline' => array(
                    'style' => PHPExcel_Style_Border::BORDER_THICK,
                    'color' => array('rgb' => '000000'),
The code loops 125 times controlling the sheet in the $current_sheet variable, however, after the 16th sheet, no format is applied.

The data in the sheets is filled from A1 to O27, maybe a memory issue??} No exception is thrown, and the file gets exported OK, the weird thing is, only applies format to the first 16, Hope you can help me on this matter
Dec 4, 2013 at 11:24 AM
Hum... I quickly write a small script using your styles, same ranges of cells filled, with 125 sheets, the styles are applied to all...