I'm using \PhpOffice\PhpSpreadsheet\Reader\Html() to read an HTML table to save into an XLSX spreadsheet. I need indentation on some rows, for example it should appear like this:
Cost of Sales
Stock
Courier Fees
In the HTML table it's easy using , but this doesn't take those multiple spaces into the Excel cells. I've tried " " (multiple spaces) and <td style='padding-left:10px;'> and even <td style='margin-left:10px;'> just in case, all to no avail. I can't find anything on Google to assist and would appreciate any advice.
Just in case, I'll include how I'm reading/writing the HTML table stored in $incomeStatement:
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Html();
$spreadsheet = $reader->loadFromString($incomeStatement);
// [headers]
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($spreadsheet, 'Xlsx');
$spreadsheet->save('php://output');
use combination with html tag
spanfollowed by space like sample belowthis example will make 4 spaces