I'm using library PHPOffice/PhpSpreadsheet to read charts.
Right now it seems that reading charts is in the order of pasted charts (doesn't matter if the later added chart is above previous charts).
I'd like to find way to mapping charts in correct order. Is it possible, to create order from top to bottom? So always the most top chart will be in the index '0'?
Also is there way to read the name of the chart - I mean the field in the Exel when you select a chart:
$reader = IOFactory::createReader('Xlsx');
$reader->setIncludeCharts(true);
$reader->setLoadAllSheets();
$spreadsheet = $reader->load('file.xlsx');
$loadedSheetNames = $spreadsheet->getSheetNames()
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
$spreadsheet->setActiveSheetIndexByName($loadedSheetName);
$activeSheet = $spreadsheet->getActiveSheet();
$chartNames = $activeSheet->getChartNames();
}