When I set the CellFormat.VerticalAlignment to 0 the documentation implies that the vertical alignment of the cell will be set to Top. This does not work. The problem lies in the extensions ApplyFormatToRange method. The line "if (format.ssSTCellFormat.ssVerticalAlignment > 0)" should be testing for greater than or equal 0 e.g. "if (format.ssSTCellFormat.ssVerticalAlignment >= 0)". Making this change fixes the problem.
I think there are also other tests in that method e.g. for ssHorizontalAlignment which should be changed in the same way.
Regards,
Nick
Hello,
Is this already implemented in the latest version, because the vertical alignment to the top of a cell is still not working.
Hi Jan
If it is not working as expected, I guess the code hasn't been fixed yet ;)
I'll have a look and revert ASAP.
Hanno
This is now fixed in the latest version.
Thanks for bringing it to my attention again!