KoolReport's Forum

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

Excel "cell" range attribute for table #2377

Open Epitello opened this topic on on Oct 8, 2021 - 1 comments

Epitello commented on Oct 8, 2021

Hi,

I have a bug with the tables (and PivotTable) in excel export.

I want to show table on a specific cell using "cell" attribute but it doesn't work. The table is alaways rendered on the first column in excel (column A).

I tried with a text element and it's well positionned.

This is my code :

<div cell="T3">
    <?php PivotTable::create($params) ?>
</div>

Thanks

Sebastian Morales commented on Oct 13, 2021

I can confirm this is a bug with Excel's PivotTable widget. We will fix it in the next version of Excel package. Meanwhile you could apply a fix yourself by opening the file excel/PivotTableBuilder.php and replace this line:

        $option['startCol'] = $pos[0];

with this one:

        $option['startColumn'] = Coordinate::columnIndexFromString($pos[0]);

Pls let us know if it works for you. 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
None yet

None