Is there a way to create a $styleArray
automatically from a existing Excel worksheet using PHPExcel?
Something like:
$styleArray = $file->getSheetByName('XY')->getStyles()->
copyAllStylesInRangeAndCreateStyleArray($range);
So I could use this generated style array with
$file->getSheetByName('AB')->getStyle($range)->
applyFromArray($styleArray)`
to copy the style to another sheet (even in another workbook) or save the information in an extra e.g. Config-File.
Or do I have to find a way using duplicateStyle()
and go through every cell (compare Styling cells)?