openspout
openspout copied to clipboard
$options->setColumnWidth() is one too small in resulting spreadsheet
Using v4.8.1:
I was setting column widths:
$options->setColumnWidth(17,1);
$options->setColumnWidth(4,2);
$options->setColumnWidth(119,3);
the resulting widths in the spreadsheet were 16, 3 and 118 (each short by 1).
I 'measured' with
=CELL("width", A1)
A related bug: it seems that you can not do eg.
$options->setColumnWidth(17, 5);
$options->setColumnWidth(119,3);
It doesn't work for me unless I call this function, for each column in sequence , and in order :
$options->setColumnWidth(10, 1);
$options->setColumnWidth(20, 2);
// etc
So incidentally, I have to set explicitly a width for columns I'm not interested in - starting with column 1 - otherwise the width is applied to incorrect columns.
So if I do this
$options->setColumnWidth(10, 3);
$options->setColumnWidth(20, 4);
// etc
... it will set widths on columns 1 and 2
Any PR is welcome