Text Alignment and Line Breaks
| API | Description | Example |
|---|---|---|
| Range.HorizontalAlignment | Property that returns or changes the horizontal alignment state of text for the specified range | let range = instance.Application.ActiveSheet.Range("A1"); console.log(range.HorizontalAlignment); range.HorizontalAlignment = instance.Enums.XlHAlign.xlHAlignCenter; |
| Range.VerticalAlignment | Property that returns or changes the vertical alignment state of text for the specified range | let range = instance.Application.ActiveSheet.Range("A1"); console.log(range.VerticalAlignment); range.VerticalAlignment = instance.Enums.XlVAlign.xlVAlignBottom; |
| Range.RowHeight | Property that returns or changes the row height for the specified range | let range = instance.Application.ActiveSheet.Range("A1"); console.log(range.RowHeight); range.RowHeight = 10; |
| Range.ColumnWidth | Property that returns or changes the column width for the specified range | let range = instance.Application.ActiveSheet.Range("A1"); console.log(range.ColumnWidth); range.ColumnWidth = 10; |
| Range.WrapText | Property that returns or changes the text wrapping state for the specified range | let range = instance.Application.ActiveSheet.Range("A1"); console.log(range.WrapText); range.WrapText = true; |
Related Features
Format Management , Font Style , Cell Background Color and Border , Conditional Formatting , Custom Formatting , Formatting Rendering Overview