Embed Excel in PowerPoint using C#

This brief tutorial describes the process to embed Excel in PowerPoint using C#. It provides the details to set the development environment, a list of steps to write the application, and a sample code showing how do you embed an Excel file in PowerPoint using C#. You will learn to embed the Excel file within a specified frame in the slide.

Steps to Embed an Excel File in PowerPoint using C#

  1. Set the IDE to use Aspose.Slides for .NET to embed Excel files in a presentation
  2. Create the Presentation class object
  3. Access the first slide where the Excel file is to be embedded
  4. Read the Excel file into the MemoryStream object
  5. Create an embedded data information object
  6. Add the OLE object frame into the slide with the required parameters
  7. Save the presentation

Follow these steps for learning how to embed an Excel file in PowerPoint using C#. Create an object of the Presentation class, access the target slide, and read the source Excel file into the MemoryStream. Create the OleEmbeddedDataInfo object at the specified position on the slide with width and height, and finally, add the OLE object to the presentation.

Code to Insert Excel Workbook into PowerPoint using C#

This code demonstrates how to embed Excel in PowerPoint using C#. Repeat this process for multiple slides and add different file types based on your requirements. Another overloaded AddOleObjectFrame() method accepts the OLE class name and path to the linked file.

This article has taught us how to embed Excel file in PowerPoint using C#. To add audio in a presentation, refer to the article: How to add audio in presentation using C#.

 English