Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Created October 10, 2020 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/e3a9ef77464fbb0818d81c79cdf18a06 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/e3a9ef77464fbb0818d81c79cdf18a06 to your computer and use it in GitHub Desktop.
Embed Document into Presentations as OLE Object in Java
// Embed Spreadsheet into a Presentations as an OLE object
int pageNumber = 1;
OlePresentationOptions oleSlidesOptions = new OlePresentationOptions("spreadsheet.xlsx", pageNumber);
// Set Coordinates and Dimensions
oleSlidesOptions.setX(10);
oleSlidesOptions.setY(10);
oleSlidesOptions.setHeight(200);
oleSlidesOptions.setWidth(200);
// Import the Spreadsheet into Presentation
Merger merger = new Merger("presentation.pptx");
merger.importDocument(oleSlidesOptions);
merger.save("output-presentation.pptx");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment