KoolReport's Forum

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

Bug Report on koolreport/excel #2844

Open Alfredo Benso opened this topic on on Oct 7, 2022 - 1 comments

Alfredo Benso commented on Oct 7, 2022

Line 470 of file ExportHandler.php

        foreach ($colMetas as $colKey => $colMeta) {

should be

        foreach ($optCols as $colKey => $colMeta) {

in order to correctly name each column of the csv file with the proper 'label' value

Sebastian Morales commented on Oct 10, 2022

Thank you, Alfredo. It's indeed a bug of CSV export's column direct label setting instead of column label meta which is working. To fix this pls replace line 474 of Excel package's ExportHandler.php file:

                $colMeta = Util::get($colMetas, $colKey, []);

with these one:

                $colMeta = Util::get($colMetas, $colKey, []);
                if (is_array($v)) $colMeta = array_merge($colMeta, $v);

We will apply this fix in the next version of Excel and KoolReport Pro. 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
solved

Excel