I have a table, and I want to export the data in this table into an excel file.
But I am having problem formatting the data cells in SKU column.
this is my code for excel
Excel::store((new StandardExport($q))->setHeaders([
'SKU',
'Order Number',
'Create Date',
'Update Date',
'Payment Method',
'Shipping Provider',
'Tracking Number',
'Status',
'Seller Remark',
'Buyer Phone',
'Buyer Name',
'Buyer Address',
'Buyer Remark',
'Shop Name'
])->setMap(function ($row) {
return [
str_replace("<br>", "\n", $row->sku),
$row->order_number,
$row->create_at,
$row->update_at,
$row->paymentMethod,
$row->logistics_info,
str_replace("<br>", "\n", $row->tracking_number),
$row->status,
$row->seller_remark,
$row->buyer_phone,
$row->buyer_name,
$row->buyer_address,
$row->buyer_remark,
$row->shopname
];
}), $filename);
but appeared like this: one line
I want to export excel like this: multiple line
any possible idea?