Skip to content

This content is for v4.x (Alpha). Switch to the Stable version.

The Slide class, a vital component of the OpenXMLOffice.Presentation library, serves as a versatile tool for manipulating individual slides within a PowerPoint presentation. Whether extracted from an existing presentation or added new, this class provides a convenient handle for developers to modify the content of a single slide.

  1. Content Manipulation: The Slide class facilitates the addition of various elements to a slide, including charts, tables, and text. Developers can seamlessly enhance the visual richness of the presentation by incorporating diverse content types.
  2. Integration with PowerPoint Templates: This class seamlessly integrates with existing PowerPoint templates, allowing developers to maintain a consistent look and feel throughout the presentation.
using OpenXMLOffice.Presentation;
public static SlideManipulation(Slide slide, DataCell[][] DataCells, AreaChartSetting AreaChartSetting){
// Add New Chart To the Slide
// Follow chart document for more info
Chart chart = slide.AddChart(DataCells, AreaChartSetting);
// To Add picture to the slide
Picture picture = slide.AddPicture("sample.jpg", PictureSetting PictureSetting);
// To Add Table
Table table = slide.AddTable(DataCells, TableSetting TableSetting);
// To Find a shape based on text from PPTX
Shape shape = slide.FindShapeByText("shape_id");
}

Slide Setting Object for slide options

  • Background
  • Header/Footer
  • Size
  • Border, etc…