That's a simple question.
I'm building a PHP Excel from scratch and is a very useful package. I need to catch the active cell or row to know which cells to modify and customize, I checked all methods in the package and I didn't found something that helped me. I'm inserting some data like this:
$sheet->appendRow(array(
$variable->value1,
$variable->value2,
$variable->value3,
));
And then I want to customize some things(This example I'm changing the background color), something like:
//The XXX is the last active row that I append some value before
$sheet->cells('XXXX',function ($cells){
$cells->setBackground('#34EC34');
});
There's some way to do find out the active cell or row to put in place of the 'XXX'? I found some question on Stack that someone was accessing by the variable $row, but I didn't found how to access....
go to class name "LaravelExcelWorksheet" in vendor/maatwebsite/excel/src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php
Try to change method modifier of getStartRow from protected to public