Excel Cell Alignments: Numerical values for e.g. xlLeft, xlRight or xlCenter? Excel Cell Alignments: Numerical values for e.g. xlLeft, xlRight or xlCenter? asp.net asp.net

Excel Cell Alignments: Numerical values for e.g. xlLeft, xlRight or xlCenter?


For VerticalAlignment:

Top:    -4160Center: -4108Bottom: -4107

And HorizontalAlignment:

Left:    -4131Center:  -4108Right:   -4152


You can use xlLeft:

Imports Microsoft.Office.Interop.Excel...oSheet.Range("A1").HorizontalAlignment = Constants.xlLeft


xcl.Range("J:J").EntireColumn.HorizontalAlignment = _Microsoft.Office.Interop.Excel.Constants.xlCenter