Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ExcelScript.VerticalAlignment enum
- Package:
- ExcelScript
Remarks
Used by
- ExcelScript.PredefinedCellStyle: getVerticalAlignment, setVerticalAlignment
- ExcelScript.RangeFormat: getVerticalAlignment, setVerticalAlignment
Examples
/**
* This script sets the vertical alignment formatting to "top"
* for every cell in the row.
*/
function main(workbook: ExcelScript.Workbook) {
// Get row 1 for the current worksheet.
const sheet = workbook.getActiveWorksheet();
const firstRow = sheet.getRange("1:1");
// Set the vertical alignment formatting on the row.
firstRow.getFormat().setVerticalAlignment(ExcelScript.VerticalAlignment.top);
}
Fields
| bottom |
| center |
| distributed |
| justify |
| top |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Scripts
Feedback
Was this page helpful?
