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

后端 未结 3 476
广开言路
广开言路 2021-02-08 16:05

I\'ve been trying to align Excel cell text values. I\'ve tried the more common xlLeft, xlRight but this doesn\'t seem to work. The error was xlLe

3条回答
  •  说谎
    说谎 (楼主)
    2021-02-08 16:37

    You can use xlLeft:

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

提交回复
热议问题