KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Export in Excel generate a error #858

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

Daniel Cordeiro commented on May 8, 2019

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

<?php

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
Usuario:
PivotTable::create(array( 'dataStore'=>$this->dataStore('evolucaoPreco') ));<--- ?>
```
David Winterburn commented on May 9, 2019

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, 2019

It works fine now. Thanks!!!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

Excel