I have an associative array, I need to display the items in Excel sheet. May I know how I can do the for loop in PHPSpreadsheet ?
$spreadsheet->getActiveSheet()
->fromArray(
$arrayData, // The data to set
NULL, // Array values with this value will not be set
'A2', // Top left coordinate of the worksheet range where
'A1' // we want to set these values (default is A1)
);
Actually the above code is working fine. But I need to give some styles or colors to some item. As I display like above I don't know which section I need to change the style. If it is in for loop then it would be better.