PowerPoint.TableMergedAreaProperties interface
Представляет свойства объединенной области ячеек в таблице.
Комментарии
[ Набор API: PowerPointApi 1.8 ]
Примеры
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Specifies the merge areas of a table.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;
// Add a table, specifying one 2x2 merged area.
shapes.addTable(3, 4, {
values: [
["A", "BB", "CCC", "DDDD"],
["E", "FF", "", "HHHH"],
["1", "", "", "1234"]
],
mergedAreas: [{ rowIndex: 1, columnIndex: 1, rowCount: 2, columnCount: 2 }]
});
await context.sync();
});
Свойства
| column |
Указывает количество столбцов для области объединенных ячеек. Должно быть 1 или больше. |
| column |
Задает отсчитываемый от нуля индекс столбца верхней левой ячейки объединенной области. |
| row |
Указывает количество строк для области объединенных ячеек. Должно быть 1 или больше. |
| row |
Задает отсчитываемый от нуля индекс строки левой верхней ячейки объединенной области. |
Сведения о свойстве
columnCount
Указывает количество столбцов для области объединенных ячеек. Должно быть 1 или больше.
columnCount: number;
Значение свойства
number
Комментарии
[ Набор API: PowerPointApi 1.8 ]
Примеры
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Specifies the merge areas of a table.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;
// Add a table, specifying one 2x2 merged area.
shapes.addTable(3, 4, {
values: [
["A", "BB", "CCC", "DDDD"],
["E", "FF", "", "HHHH"],
["1", "", "", "1234"]
],
mergedAreas: [{ rowIndex: 1, columnIndex: 1, rowCount: 2, columnCount: 2 }]
});
await context.sync();
});
columnIndex
Задает отсчитываемый от нуля индекс столбца верхней левой ячейки объединенной области.
columnIndex: number;
Значение свойства
number
Комментарии
[ Набор API: PowerPointApi 1.8 ]
Примеры
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Specifies the merge areas of a table.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;
// Add a table, specifying one 2x2 merged area.
shapes.addTable(3, 4, {
values: [
["A", "BB", "CCC", "DDDD"],
["E", "FF", "", "HHHH"],
["1", "", "", "1234"]
],
mergedAreas: [{ rowIndex: 1, columnIndex: 1, rowCount: 2, columnCount: 2 }]
});
await context.sync();
});
rowCount
Указывает количество строк для области объединенных ячеек. Должно быть 1 или больше.
rowCount: number;
Значение свойства
number
Комментарии
[ Набор API: PowerPointApi 1.8 ]
Примеры
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Specifies the merge areas of a table.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;
// Add a table, specifying one 2x2 merged area.
shapes.addTable(3, 4, {
values: [
["A", "BB", "CCC", "DDDD"],
["E", "FF", "", "HHHH"],
["1", "", "", "1234"]
],
mergedAreas: [{ rowIndex: 1, columnIndex: 1, rowCount: 2, columnCount: 2 }]
});
await context.sync();
});
rowIndex
Задает отсчитываемый от нуля индекс строки левой верхней ячейки объединенной области.
rowIndex: number;
Значение свойства
number
Комментарии
[ Набор API: PowerPointApi 1.8 ]
Примеры
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Specifies the merge areas of a table.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;
// Add a table, specifying one 2x2 merged area.
shapes.addTable(3, 4, {
values: [
["A", "BB", "CCC", "DDDD"],
["E", "FF", "", "HHHH"],
["1", "", "", "1234"]
],
mergedAreas: [{ rowIndex: 1, columnIndex: 1, rowCount: 2, columnCount: 2 }]
});
await context.sync();
});