Newbie here, here's the question :
Does PhpSpreadSheet have a function to generate an .xlsx
file from a PHP array automatically?
I searched but could not find.
So far, I only found the setCellValue()
function which (obviously) allows me to set the value of a cell.
I would like to set the values of a lot of cells so I am going to use a for-loop to do that, unless there is already a function that does that.
If it does exist, I assume it should probably look like that :
$cell = [Number of the first excel cell you want to write (e.g : 'B2')]
$path = [Path of the file you want to write (e.g : 'php://output')]
$mysheet->arrayToXlsx($cell, $path)
I am going to use this quite a few times in the next days so please let me know if this function is already provided by PhpSpreadSheets !