Вы сказали:
Как таблицу html поместить в exel
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use PhpOffice\PhpSpreadsheet\Style\Color;
use PhpOffice\PhpSpreadsheet\Style\Fill;
<table>
<thead>
<tr>
<th rowspan="2">Цена, Юани</th>
<th rowspan="2">Наша себ-сть, ₽</th>
<th colspan="2">Маржа, %</th>
</tr>
<tr class="sub-header">
<th>45</th>
<th>25</th>
</tr>
</thead><tbody>
<tr>
<td>1828</td>
<td>34016 ₽</td>
<td>61 847 ₽</td>
<td>45 355 ₽</td>
</tr>
</tbody>
</table>