PowerPoint.TableColumnProperties interface
Предоставляет свойства столбца таблицы.
Комментарии
Используется
Примеры
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Specifies the column widths and row heights of a table.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;
// Add a table, specifying column widths and row heights.
shapes.addTable(3, 4, {
columns: [{ columnWidth: 100 }, { columnWidth: 200 }, { columnWidth: 100 }, { columnWidth: 200 }],
rows: [{ rowHeight: 60 }, { rowHeight: 120 }, { rowHeight: 180 }]
});
await context.sync();
});
Свойства
| column |
Представляет нужную ширину каждого столбца в точках или не определено. При добавлении таблицы для столбцов с неопределенной шириной ширина столбца будет вычисляться путем равномерного деления оставшейся ширины таблицы между этими столбцами. Если ширина таблицы не определена, будет использоваться ширина столбца по умолчанию. |
Сведения о свойстве
columnWidth
Представляет нужную ширину каждого столбца в точках или не определено.
При добавлении таблицы для столбцов с неопределенной шириной ширина столбца будет вычисляться путем равномерного деления оставшейся ширины таблицы между этими столбцами. Если ширина таблицы не определена, будет использоваться ширина столбца по умолчанию.
columnWidth?: number | undefined;
Значение свойства
number | undefined
Комментарии
Примеры
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Specifies the column widths and row heights of a table.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;
// Add a table, specifying column widths and row heights.
shapes.addTable(3, 4, {
columns: [{ columnWidth: 100 }, { columnWidth: 200 }, { columnWidth: 100 }, { columnWidth: 200 }],
rows: [{ rowHeight: 60 }, { rowHeight: 120 }, { rowHeight: 180 }]
});
await context.sync();
});