KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.

Export in Excel generate a error #858

Closed Daniel Cordeiro opened this topic on on May 8 - 2 comments

Daniel Cordeiro commented on May 8

When I try using Excel\PivotTable, I get the following error:

Erro na classe /vendor/koolphp/koolreport/packages/pivot/PivotExcelExport.php
Erro: Call to a member function meta() on array


use koolreport\excel\PivotTable;

$sheet1 = "Custo Evitado Anual Pivot";


[ 'name' => 'Calibri', //'Verdana', 'Arial' 'size' => 30, 'bold' => false, 'italic' => FALSE, 'underline' => 'none', //'double', 'doubleAccounting', 'single', 'singleAccounting' 'strikethrough' => FALSE, 'superscript' => false, 'subscript' => false, 'color' => [ 'rgb' => '000000', 'argb' => 'FF000000', ] ], 'alignment' => [ 'horizontal' => 'general',//left, right, center, centerContinuous, justify, fill, distributed 'vertical' => 'bottom',//top, center, justify, distributed 'textRotation' => 0, 'wrapText' => false, 'shrinkToFit' => false, 'indent' => 0, 'readOrder' => 0, ], 'borders' => [ 'top' => [ 'borderStyle' => 'none', //dashDot, dashDotDot, dashed, dotted, double, hair, medium, mediumDashDot, mediumDashDotDot, mediumDashed, slantDashDot, thick, thin 'color' => [ 'rgb' => '808080', 'argb' => 'FF808080', ] ], //left, right, bottom, diagonal, allBorders, outline, inside, vertical, horizontal ], 'fill' => [ 'fillType' => 'none', //'solid', 'linear', 'path', 'darkDown', 'darkGray', 'darkGrid', 'darkHorizontal', 'darkTrellis', 'darkUp', 'darkVertical', 'gray0625', 'gray125', 'lightDown', 'lightGray', 'lightGrid', 'lightHorizontal', 'lightTrellis', 'lightUp', 'lightVertical', 'mediumGray' 'rotation' => 90, 'color' => [ 'rgb' => 'A0A0A0', 'argb' => 'FFA0A0A0', ], 'startColor' => [ 'rgb' => 'A0A0A0', 'argb' => 'FFA0A0A0', ], 'endColor' => [ 'argb' => 'FFFFFF', 'argb' => 'FFFFFFFF', ], ], ]; ?>
Relatorio de Custo Evitado Anual Pivot
Custo Evitado Anual Pivot
PivotTable::create(array( 'dataStore'=>$this->dataStore('evolucaoPreco') ));<--- ?>
David Winterburn commented on May 9

Hi Daniel,

Please try this export command:

PivotTable::create(array( 'dataSource'=>'evolucaoPreco' ));

This is the Excel package's PivotTable widget and its setting is a bit different from the Pivot's PivotTable one. We will try to make them as much similar as possible. In the meantime please try this command and let us know if it works for you. Thanks!

Daniel Cordeiro commented on May 15

It works fine now. Thanks!!!

Give tips to supporter for his good work

If you feel that supporter has done a good work, consider giving him some credit. Any amount put into the tips box below is appreciated. By doing so, you have contribtuted to the existence of KoolReport and the quality of support.

Tips box
None yet