This project has moved and is read-only. For the latest updates, please go here.

Column( ).Width

Dec 27, 2010 at 1:27 PM

In VC#:

Column(1).Width = 2;

In excel width column "A" = 1,29 (!?)

How to set the column width is equal to 2?

Dec 27, 2010 at 3:17 PM


The column width in the file is not the same as the width in Excel. Excel recalculates it. Easiest way to check the width if you want to have it exact is to save your excel file-->rename *.zip and extract it.

Now you can see the width of the columns in the xl\worksheets\sheet#.xml. in your case 2 = 2.7109375

If you want to deep dive into it, you can find the calculations in the ECMA-376 documentation.