$styleArray = [
'borders' => [
'allBorders' => [
'borderStyle' => Border::BORDER_THIN,
],
],
'alignment' => [
'wrapText' => true,
],
];
$sheet->setCellValue('A1', 'product_name')->getStyle('A1')->applyFromArray($styleArray);