ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Column Width Units (https://www.excelbanter.com/excel-programming/334428-excel-column-width-units.html)

Robby Powell

Excel Column Width Units
 
In Excel XML the docs say the column width and row height is in points. Row
height is correct as points, but column width is clearly something different
than simply points.

Could somebody please define the units used for column width?

Thanks,
Robby



Rob Bovey

Excel Column Width Units
 
"Robby Powell" wrote in message
...
In Excel XML the docs say the column width and row height is in points.
Row
height is correct as points, but column width is clearly something
different
than simply points.
Could somebody please define the units used for column width?


Hi Robby,

You are correct, column width measurement is an odd-ball in Excel. 1
increment of column width is equal to the width of the zero character of the
font used by the Normal style for a workbook. So a column of width 10 would
fit exactly 10 zero characters in the font specified by the Normal style.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm



Robby Powell

Excel Column Width Units
 


Rob,

I understand column widths in the Excel BIFF (xls) format to be in units
of the size of the character "0", and yes, quite oddball indeed.

My issue is in the Excel XML file format. For example, in Excel I set a
column to a size of 1.14 (26 pixels) and save it to XML. If I look at
the XML file in IE, the column has a width of 9.75. That is not pixels,
points, or units of character "0". What is it?

Thanks,


*** Sent via Developersdex http://www.developersdex.com ***

Rob Bovey

Excel Column Width Units
 
"Robby Powell" wrote in message
...
I understand column widths in the Excel BIFF (xls) format to be in units
of the size of the character "0", and yes, quite oddball indeed.

My issue is in the Excel XML file format. For example, in Excel I set a
column to a size of 1.14 (26 pixels) and save it to XML. If I look at
the XML file in IE, the column has a width of 9.75. That is not pixels,
points, or units of character "0". What is it?


Hi Robby,

Sorry, I misunderstood your question. I hadn't looked into this
previously, but after experimenting with it I think the column width value
specified in XML is measured in points. I base this conclusion on the fact
that if you set the row height (which we know is measured in points) to the
same value as XML reports for the column width, you will get what appears to
be a perfectly square cell at the intersection of that row and column.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm




All times are GMT +1. The time now is 12:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com