Change cell's WIDTH programmatically

  • Thread starter Thread starter Marat
  • Start date Start date
M

Marat

I've tried to change cell's WIDTH programmatically, but it
seems that this property is ReadOnly.
Is there any way that will allow me to change cell's WIDTH
programmatically, say from 100 pixels to 200 pixels?

TIA
 
Marat,

You can change the ColumnWidth property, which is measured not in points but
by the number of '0' characters in the default font that can be displayed in
the cell -- e.g., a ColumnWidth of 8 is wide enough to display eight '0'
characters.

To convert between this measurement and points, set the ColumnWidth to 1 and
read the Width property. Divide the desired number of points by Width value
of a cell whose ColumnWidth is 1. In Arial 10, this is about 9
points/character.
 
Back
Top