Get Text Portions

Introduction

In PowerPoint table cells, you can work with individual parts of text by changing their formatting independently. For example, you can select a portion of text and change its font, size, color, or style (bold, italic, underline) without affecting the rest of the text. Use the following methods to get text portions from a paragraph.

GetTableCellPortions

API Information

API Type Description Resource
/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/rows/{rowIndex}/cells/{cellIndex}/paragraphs/{paragraphIndex}/portions GET Returns text portions from a paragraph in a table cell in a presentation saved in a storage. GetTableCellPortions

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).
rowIndex integer path true The 1-based index of a row.
cellIndex integer path true The 1-based index of a cell.
paragraphIndex integer path true The 1-based index of a paragraph.
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 first shape) with four columns and three rows on the ninth slide. The cell (2, 2) contains three paragraphs. Get text portions from the third paragraph.

The table

cURL Solution

SDK Solutions

GetTableCellPortion

API Information

API Type Description Resource
/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/rows/{rowIndex}/cells/{cellIndex}/paragraphs/{paragraphIndex}/portions/{portionIndex} GET Returns a text portion from a paragraph in a table cell in a presentation saved in a storage. GetTableCellPortion

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).
rowIndex integer path true The 1-based index of a row.
cellIndex integer path true The 1-based index of a cell.
paragraphIndex integer path true The 1-based index of a paragraph.
portionIndex integer path true The 1-based index of a text portion.
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 first shape) with four columns and three rows on the ninth slide. The cell (2, 2) contains three paragraphs (see the picture above). Get the second text portion from the third paragraph.

cURL Solution

SDK Solutions

SDKs

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