KoolReport's Forum

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

Excel export not displaying correct data #2757

Open Aljaz Ketis opened this topic on on Jul 15, 2022 - 34 comments

Aljaz Ketis commented on Jul 15, 2022

Since we updated the export package to the newest edition our clients started reporting errors in the excels.

as seen in picture some of the rows in excel just display some random characters, and when i debug I can see that the row that is incorrectly displayed has all the needed informaion and no special characters or something like that. All rows are defined as strings

Sebastian Morales commented on Jul 15, 2022

Pls post your report setup, export code for us to check it for you. Does this happen when you export to CSV file or use other data/tables?

Aljaz Ketis commented on Jul 15, 2022

You can see belllow an example of what it stored inside dataStore and when trying to format it in excel it displays random characters

Aljaz Ketis commented on Jul 15, 2022

This is really frustrating, how can you release such unstable releases of you enterprise packages. We upgraded becouse you added pivotTables to bigspreadsheet excel export, but other reports don't work properly, if I revert to old excel it works fine again, but the bigspreadsheet with pivotTable throw exceptions. This is really sloppy by your developers.

Sebastian Morales commented on Jul 18, 2022

Pls email us your report setup, export code, and this sample data to support@koolreport.com or support@koolphp.net. We would try to replicate the issue and find a fix for your case. Tks,

Wojciech commented on Aug 1, 2022

Hi

My client is also affected with that bug and it looks really serious. See me gist of code to repreduce the issue:

https://gist.github.com/woduda/00cc32417b4be0916db07f88e421ba2c

From my investigation the wrong value saved in excel cell is created in

koolreport\excel\TableBuilder::buildTableBodyRow()

in line with:

$value = Util::map($cellMap, [$colKey, $value, $dataRow], $value);
Sebastian Morales commented on Aug 2, 2022

As replied to you via email, here's the solution:

Open the file "koolreport/excel/TableBuilder.php" and replace this line:

    $cellMap = Util::get($this->map, 'cell', []);

with this one:

    $cellMap = Util::get($this->map, 'cell'); 

We will release a new version of Excel package with this fix. Tks,

APP commented on Aug 24, 2022

It seems that the fix is not in version 10.0.0 of koolreport/excel yet, when will there be an update?

Aljaz Ketis commented on Aug 29, 2022

Was the fix implemented in the new version yet? If not, when can we expect that to happen.

Sebastian Morales commented on Aug 31, 2022

Yes, the fix for this issue will be available in the next version (10.x) of Excel package which will be released in the next 2 weeks. Tks,

Aljaz Ketis commented on Sep 20, 2022

Also i found out that since the release of new version of PIVOT, if you have no data in your database it throws an error instead of displaying an empty table.

message: "Undefined index: title"

code: 0

file: "\vendor\koolreport\pivot\PivotUtil.php"

line: 239

Sebastian Morales commented on Sep 26, 2022

Which version of Pivot do you use? The newest version of Pivot to be released (9.0.0) should fix this one.

Aljaz Ketis commented on Sep 26, 2022

Currenlty the latest is 8.5, so when will you realease the new version?

Sebastian Morales commented on Sep 26, 2022

We have released a new version of KoolReport Pro 6.0.1, which includes Pivot 9.0.0, and Dashboard 4.0.1. Pls try them and let us know the result of this issue. Tks,

Aljaz Ketis commented on Sep 28, 2022

I cannot get that version, when updating packages it takes the 6.0.0, looks like it is not released yet.

Aljaz Ketis commented on Sep 28, 2022

In change logs on website you have latest version 5.6.2, on github 6.0.0

Sebastian Morales commented on Sep 29, 2022

Pls generate a new auth token if you install via composer. Otherwise, you could download the latest version in the client section of our site.

Aljaz Ketis commented on Oct 3, 2022

now other issues were found. There is an error regarding retrieving settings of the report. Exception is thrown on ResourceManager on line 79, when you run:

$assets = (string)Utility::get($this->report->getSettings(), "assets");

don't you do any testing, before you release? I am really disappointed at this point. Your trying to cast this to string while if i debug I can see that this is an array. Am I doing something wrong? This is bound to your core logic, not overriding this method or anything.

Sebastian Morales commented on Oct 3, 2022

This is indeed a very neglectful error of ours. We will fix it and release an updated version today or tomorrow. Thank you for your excellent feedback!

Aljaz Ketis commented on Oct 4, 2022

Please notify me, when this will be fixed. We urgently need to update it on our side.

Sebastian Morales commented on Oct 4, 2022

Please try the latest version of KoolReport Pro 6.0.3 and let us know if it fixes this problem for you. Tks,

Aljaz Ketis commented on Oct 7, 2022

i updated it and there is another issue regarding empty PIVOT tables. It throws an error in PivotUtil.cs at line 1058. You are trying to reach an index which is not defined.

Sebastian Morales commented on Oct 10, 2022

Pls replace line 1058 in PivotUtil.php with this one:

            $cis = Util::get($indexToData, $ri, []);

We will apply this fix in the next version of Pivot and KoolReport Pro. Tks,

Aljaz Ketis commented on Oct 14, 2022

We are operating Pivot process on ~700000 rows of data and displaying insde PivotTable in excell and it throws an error, it here some way we can optimize it? We are already using the BigSpreadSheetData when exporting.

Sebastian Morales commented on Oct 17, 2022

Is this a memory or time out error? Pls post the exact error message with error track trace if possible. Tks,

Aljaz Ketis commented on Oct 17, 2022

Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) {"userId":1,"exception":"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) at {root}/vendor/koolreport/pivot/processes/Pivot.php:560)

this is the error.

Sebastian Morales commented on Oct 18, 2022

If you use PDODataSource with MySQL database, there's an option called "MysqlBufferedQuery" that you could set to be false to reduce memory:

    'pdoMysql' => [
        ...
        "MysqlBufferedQuery" => false,
    ], 

Otherwise, the only solution is to increase PHP memory limit. Rgds,

Richb201 commented on Oct 23, 2022

I am also having some issues with the Excel package. I'd like to upgrade my code to the most stable Excel package. How do I do this? I don;'t want to upgrade everything, just Excel. Is there a doc on how to do this?

Also, I see that my question does not have the $ icon, although I am a paying customer Have you lost fact that I pay each year??

Sebastian Morales commented on Oct 24, 2022

Richard, it seems the current Pro version fixes its dependent packages' version. Thus you can not update a particular package yet. We will fix the version requirement so that individual package update is possible. Meanwhile you could download the Excel package zip file and extract it to your vendor directory.

Regarding your payment status, pls check with sales email (sales@koolreport.com). I think the $ icon is for giving tip. Only the star icon at the beginning of title of each topic indicates paying customers or not. Rgds,

Aljaz Ketis commented on Oct 24, 2022

There is another exception thrown with the update of Excel BarChart library, which was not thrown prior to update

Richb201 commented on Oct 24, 2022

Sebastian, In response to your instructs I downloaded KR 6.01 and extracted to another dir. I don't see a dir Excel as a choice anywhere. Do you?

Sebastian Morales commented on Oct 26, 2022

Aljaz, what version is phpoffice/phpspreadsheet package on your environment?

Sebastian Morales commented on Oct 26, 2022

Richard, I think you downloaded the KoolReport Core package. Excel one should be in the KoolReport Pro or its own zip.

Aljaz Ketis commented on Oct 26, 2022

phpoffice/phpspreadsheet is currently on 1.25.2

Sebastian Morales commented on Oct 31, 2022

Aljaz, would you mind posting/emailing the excel chart code and sample data that produced the error? Tks,

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
bug

Excel