2
Reply

Excel - can't align column content to Center

Pavel

Pavel

Oct 2 2012 5:57 AM
7.4k
Hello,

For aligning column content to Center I use following command:

myExcelWorksheet.Columns[

"X:Z"].HorizontalAlignment = HorizontalAlignment.Center;

Unfortunately it doesn't work - the cell content remains aligned to the Left.

Surprisingly for Right alignement the same command works !

What could be workaround ?

Regards.

Pavel.



Answers (2)