Skip to content

Add support for embedded object extractor#1607

Merged
tonyqus merged 6 commits into
nissl-lab:masterfrom
antony-liu:poi/embedded-object
Aug 9, 2025
Merged

Add support for embedded object extractor#1607
tonyqus merged 6 commits into
nissl-lab:masterfrom
antony-liu:poi/embedded-object

Conversation

@antony-liu
Copy link
Copy Markdown
Collaborator

#60519 - Extractor for *SSF embeddings
#60520 - Provide *SSF functionality via Common SS
#60521 - Enable nested XSSF GroupShapes and fix calculation of Client-/ChildAnchor
#60586 - Support embedding OLE1.0 package in XSSF / SS Common

@tonyqus tonyqus requested a review from Copilot July 20, 2025 21:47
@tonyqus tonyqus added this to the NPOI 2.7.5 milestone Jul 20, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive support for embedded object extraction in XSSF/OOXML format spreadsheets. The changes enable creation, reading, and extraction of OLE packages and embedded objects within Excel files, addressing several issues related to SSF embeddings and XSSF GroupShapes functionality.

Key Changes:

  • Added embedded object extractor functionality with new EmbeddedExtractor and EmbeddedData classes
  • Implemented OLE package embedding support in XSSFWorkbook with AddOlePackage method
  • Enhanced drawing and shape handling with improved generic type safety using IDrawing

Reviewed Changes

Copilot reviewed 63 out of 66 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ooxml/XSSF/UserModel/XSSFObjectData.cs New class implementing IObjectData for XSSF embedded objects
ooxml/XSSF/Extractor/EmbeddedExtractor.cs New extractor class for identifying and extracting embedded documents
ooxml/XSSF/Extractor/EmbeddedData.cs New data container class for embedded object information
main/SS/UserModel/IObjectData.cs New interface defining common OLE shape behavior
ooxml/XSSF/UserModel/XSSFWorkbook.cs Added AddOlePackage method for embedding OLE objects
multiple test files Updated IDrawing type signatures to use generic IDrawing
OpenXmlFormats classes Enhanced XML schema support for OLE objects and drawing elements
Comments suppressed due to low confidence (2)

testcases/ooxml/XSSF/SXSSFITestDataProvider.cs:28

  • Separate the using statements onto different lines for better readability and consistency with coding standards.
    using NPOI.XSSF.UserModel;

testcases/ooxml/XSSF/SXSSFITestDataProvider.cs:34

  • The [TestFixture] attribute is removed but this appears to be a test class. Verify that test discovery still works correctly without this attribute.
     */

Comment thread testcases/ooxml/XSSF/UserModel/TestXSSFDrawing.cs Outdated
Comment thread ooxml/XSSF/UserModel/XSSFObjectData.cs Outdated
Comment thread ooxml/XSSF/UserModel/XSSFShapeGroup.cs
@tonyqus
Copy link
Copy Markdown
Member

tonyqus commented Aug 9, 2025

LGTM

@tonyqus tonyqus merged commit cf1980d into nissl-lab:master Aug 9, 2025
2 of 3 checks passed
@antony-liu antony-liu deleted the poi/embedded-object branch August 20, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants