P
Peter Gummer
Hi,
I'm formatting some data that I've loaded programmatically into a
spreadsheet. I've started by calling WrapText on top row (the the
column headings), then AutoFit on all of the columns. It looks like a
nice start.
Then I want the column headings to be bold, so I set Bold true on that
range. I set it bold _before_ setting WrapText true and calling
AutoFit, yet the text in the headings does not fit properly. The column
widths are correct for a normal font, but bold makes the text occupy
more pixels, so some long words are being broken at the last character.
It looks like AutoFit ignores the fact that some of the text is bold.
I'm working around this by adding 2 to each column's ColumnWidth. This
looks nice for the sample data I've tried, but it's a kludge.
I'd rather get AutoFit working properly. Is this a known bug? Is there
a workaround?
-- Peter Gummer
I'm formatting some data that I've loaded programmatically into a
spreadsheet. I've started by calling WrapText on top row (the the
column headings), then AutoFit on all of the columns. It looks like a
nice start.
Then I want the column headings to be bold, so I set Bold true on that
range. I set it bold _before_ setting WrapText true and calling
AutoFit, yet the text in the headings does not fit properly. The column
widths are correct for a normal font, but bold makes the text occupy
more pixels, so some long words are being broken at the last character.
It looks like AutoFit ignores the fact that some of the text is bold.
I'm working around this by adding 2 to each column's ColumnWidth. This
looks nice for the sample data I've tried, but it's a kludge.
I'd rather get AutoFit working properly. Is this a known bug? Is there
a workaround?
-- Peter Gummer