douqiao6015 2019-04-18 23:31
浏览 52

PHPSpreadsheet fromArray with Font Color change

I just wanted to ask this function in phpspreadsheet called fromArray.
As an example. I have

$array1 = [[1,2,3,4], [1,2,3,4]]

as my array. It creates the excel sheet properly no problem. I was wondering if it is possible to add some styling to it in a way like

$array = [
 [
    [1 => 'color: red'],
    2,
    3,
    4
 ], 
    [
    1,
    2,
    3,
    4
  ]
]

Any idea on how I can implement this? Thank you!

  • 写回答

0条回答 默认 最新

    报告相同问题?