PowerPoint.TableMergedAreaProperties interface
Представляет свойства объединенной области ячеек таблицы.
Комментарии
Используется
Примеры
// 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
Комментарии
Примеры
// 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
Комментарии
Примеры
// 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
Комментарии
Примеры
// 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
Комментарии
Примеры
// 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();
});