Tag: width

Nov

Calculate Excel column width pixel interval

Brace yourself. You’re about to learn the secret behind how Excel mysteriously calculates the column width intervals. In this article, I’m not going into the details of the column widths, but the column width intervals. There’s a difference. From the Open XML SDK specs: width = Truncate([{Number of Characters} * {Maximum Digit Width} + {5 […]

Jan

Calculating column widths in Excel Open XML

Commenter Roie said that the formula for calculating column widths in Excel Open XML should still be manageable. This is despite the scary formula mentioned before: width = Truncate([{Number of Characters} * {Maximum Digit Width} + {5 pixel padding}] / {Maximum Digit Width} * 256) / 256 So I put on my explorer’s hat, and […]