mk-j / PHP_XLSXWriter

Lightweight XLSX Excel Spreadsheet Writer in PHP
MIT License
1.84k stars 663 forks source link

How to add cell data starting with space or more space (not trimmed) #336

Closed AdeSupriyadi closed 1 year ago

AdeSupriyadi commented 1 year ago

I need to add cell value with indent, then I added space before.

example:

$style =  ['font-size' => 9, 'font-style' => 'bold', 'halign' => 'center', 'wrap_text' => false, 'border-style' => 'thin', 'border' => 'left,right,top,bottom'];
$writer->writeSheetRow($sheet, ['           it is cell value'], $style);

but the result always trimmed. it is cell value How to get result without trimmed space before text?

mk-j commented 1 year ago

I tested this, and I can't reproduce it. It wasn't getting trimmed when I tried it.