Excel.ShapeTextHorizontalAlignment enum
Specifies the horizontal alignment for the text frame in a shape.
Remarks
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/44-shape/shape-textboxes.yaml
await Excel.run(async (context) => {
const shapes = context.workbook.worksheets.getItem("Shapes").shapes;
const textbox = shapes.getItem("Textbox");
textbox.textFrame.horizontalAlignment = Excel.ShapeTextHorizontalAlignment.center;
await context.sync();
});
Fields
center = "Center" | |
distributed = "Distributed" | |
justify = "Justify" | |
justifyLow = "JustifyLow" | |
left = "Left" | |
right = "Right" | |
thaiDistributed = "ThaiDistributed" |
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 Add-ins