We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Column width and Row height

I would like to get the column and row sizes from Excel in the form that it presents to the user, which is number of characters (as opposed to points, etc.). Your hover help states that these numbers are in points, but when I actually retrieve them for a particular cell, they do appear to be number of characters (row is exact, column appears to be a little large). When I ask for these settings for the workbook.Columns[1].ColumnWidth, I get bad values (-1.xxxxE308) I repeat, number of characters is preferable, since that results in our system showing the same width (significant digits for our auto-round) on different size screens. I just want to make sure I can still get to this later. Please clarify what is happening. Thanks, Greg

1 Reply

GR Greg April 25, 2004 01:12 PM UTC

I''ve looked into this again. It appears that on the terminology, we were both half-right. Excel uses average character width for column width, and points for row height. See http://support.microsoft.com/?kbid=213422 And for the really odd numbers (-1.7976931348623157E+308) I''m getting from Column and Row indexing Column[0].ColumnWidth, etc., they actually work in my program, so it must be some type of datatype/display issue. -Greg
Loader.
Live Chat Icon For mobile
Up arrow icon