Merge Table Cells

Introduction

Merging table cells in PowerPoint documents is the process of combining two or more cells into one larger cell. This is useful for creating headers, improving the appearance of the table, and enhancing data readability. After merging the cells, you can adjust the formatting of the merged cell to make it look appropriate. This includes changing the font size, text alignment, etc. Use the following method to merge table cells in a presentation.

MergeTableCells

API Information

API Type Description Resource
/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/mergeCells POST Merges table cells in a presentation saved in a storage. MergeTableCells

Request Parameters

Name Type Location Required Description
name string path true The name of a presentation file.
slideIndex integer path true The 1-based index of a slide.
shapeIndex integer path true The 1-based index of a shape (must be a table).
tableCellMergeOptions TableCellMergeOptions body true The data transfer object with merge parameters.
password string header false The password to open the presentation.
folder string query false The path to the folder containing the presentation file.
storage string query false The name of the storage contaning the folder.

Examples

In the default storage, the document MyPresentation.pptx contains a table (the second shape) with three columns and four rows on the first slide. Merge the four cells (1,1), (1,2), (2,1), and (2,2) into one cell.

The table

cURL Solution

SDK Solutions

The result:

The table

SDKs

Check Available SDKs to learn how to add an SDK to your project.