The Syncfusion PowerPoint library enables you to create, edit, and format tables in PowerPoint slides. Rows and cells can be iterated easily..
The Syncfusion PowerPoint library supports creating tables from scratch or by copying them from another slide with ease. Cells can be accessed by their index positions and content can be added to them.
You can change the cell content, cell formatting, and cell styles. Iterate the table by row or column to identify a cell in which to make changes.
There are 74 built-in table styles you can use to change the appearance of a table.
Populate the content of a PowerPoint table by iterating the cells. To import data from any database, get the data from a database and set the data in the appropriate cells.
The Syncfusion PowerPoint library lets you get the height of a table after adding content to it. You can check whether the table height exceeds the layout (to avoid content overlapping) or slide by identifying the table height.
Append a row or column to the end of a table or insert a row or column at specific index positions.
Merge table cells with row or column cells based on your requirement.
Change the appearance a table by customizing the table border, cell background, cell margins, and more. The table background can be set or modified with solid, gradient, picture, and pattern fill.
Easily create tables in PowerPoint slides using a few simple lines of C# code as demonstrated below. Also explore our .NET PowerPoint Example that shows how to create and modify PowerPoint on different platforms.
//Create a PowerPoint presentation
IPresentation pptxDoc = Presentation.Create();
//Add slide to the presentation
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
//Add a table to the slide
ITable table = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200);
//Initialize index values to add text to table cells
int rowIndex = 0, colIndex;
//Iterate row-wise cells and add text to it
foreach (IRow rows in table.Rows)
{
colIndex = 0;
foreach (ICell cell in rows.Cells)
{
cell.TextBody.AddParagraph("(" + rowIndex.ToString() + " , " + colIndex.ToString() + ")");
colIndex++;
}
rowIndex++;
}
//Save the presentation
pptxDoc.Save("Sample.pptx");
//Close the presentation
pptxDoc.Close();
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.