Я использую Maatwebsite / Excel для экспорта моего Blade-представления в Excel, но когда я экспортирую его в Excel, размер шрифта не вступает в силу и не приводит его к центру.
Если это невозможно в maatwebiste / excel, есть ли какая-либо другая служба отчетов, например RDLC, для laravel
Мой взгляд
<html>
<head>
<title>asdf</title>
</head>
<body>
<table border="1" cellpadding="0px" cellspacing="0px" width="100%">
<thead>
<tr>
<td width="100%" colspan="12" align="center" style="text-align:
center;font-size:50pt">Should be large and in center</td>
</tr>
<tr>
<td>id</td>
<td>quantity</td>
<td>units_id</td>
<td>description</td>
<td>requster</td>
<td>checker</td>
<td>approver</td>
<td>created_at</td>
<td>updated_at</td>
<td>remarks</td>
<td>request_number</td>
<td>steps</td>
</tr>
</thead>
<tbody>
@foreach($posts as $post)
<tr>
<td>{{$post->id}}</td>
<td>{{$post->quantity}}</td>
<td>{{$post->units_id}}</td>
<td>{{$post->description}}</td>
<td>{{$post->requster}}</td>
<td>{{$post->checker}}</td>
<td>{{$post->approver}}</td>
<td>{{$post->created_at}}</td>
<td>{{$post->updated_at}}</td>
<td>{{$post->remarks}}</td>
<td>{{$post->request_number}}</td>
<td>{{$post->steps}}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>
Мой контроллер
public function export()
{
return Excel::download(new UsersExport, 'posts.xlsx');
}
И мой экспортКонтроллер
class UsersExport implements FromView
{
public function view(): View
{
return view('exporting', [
'posts' => Procurment_request::all()
]);
}
}
My View
Мой экспортированный файл Excel
Заранее спасибо