This guide provides assistance on how to add sections in PowerPoint with C# REST API. You will learn to automatically add/update/delete a section in PowerPoint with C# RESTful Service using a .NET-based Cloud SDK. A list of steps is shared in it that guides you to write the application and add sections at specific positions in the presentation.
Prerequisite
- Create an account API credentials
- Download Aspose.Slides Cloud SDK for Dotnet for inserting slide sections
- Setup C# project with the above SDK for working with sections
Steps to Add Slide Sections with C# REST API
- Create the SlidesApi class object for working with sections using the Client ID and secret
- Upload the source PowerPoint file with a few slides for adding sections to it
- Instantiate the Sections class object and create a new list of Section objects for it
- Create and add a new Section object by setting the first slide index and section name
- Add as many sections in the SectionList as required and call the SetSections() to add the list of sections
- Download the updated PowerPoint file
These steps explain how to group slides in PowerPoint with C# REST API. Use the Sections collection for adding new sections and add desired sections in the list by setting the first slide index in each section and its name. Finally, call the SetSections() method to create the sections and download the updated file from the cloud if required or perform further operations if any.
Code to Add a PowerPoint Section with C# REST Interface
This code demonstrates how to work with PowerPoint slide sections with C# RESTful Service. You may update the default section starting from the first slide in the presentation by changing its name and calling the UpdateSection method. To access all the sections in a presentation, call the GetSections() method, delete a section by calling the DeleteSection(), and move a section by calling the MoveSection() method.
This article has introduced us to sections in a presentation. If you want to work with footers in a presentation, refer to the article on edit header and footer in PowerPoint with C# API.