Skip to content

OLE Objects inserted into multiple worksheets become icon-only (non-functional) with incorrect position at A1 #2243

@GARY-ZA

Description

@GARY-ZA

EPPlus usage

Noncommercial use

Environment

.NET Framework: 4.8 OS: Windows11

Epplus version

8.4.0

Spreadsheet application

Excel

Description

Steps to Reproduce

  1. Create or open an Excel package
  2. Loop through multiple files (10+ files recommended for testing, pdf, docx, xlsx,txt,...)
  3. For each file:
    • Create a new worksheet
    • Insert an OLE object using AddOleObject() with DisplayAsIcon = true
    • Set position using SetPosition(11, 0, 0, 5) (targeting row 12)
  4. Save the package (either after each file or once at the end)
  5. Open the resulting Excel file and inspect each worksheet
    Expected Behavior
    • All OLE objects should be fully embedded and double-clickable to open with the associated application
    • All OLE objects should be positioned at the specified location (row 12, column A)
    Actual Behavior
    • Attachments 1-3: OLE objects work correctly (embedded, clickable, correct position)
    • Attachment 4: OLE object is icon-only (not a real embedded object), positioned at A1
    • Attachments 5-8: OLE objects work correctly
    • Attachment 9 and beyond: All OLE objects are icon-only, positioned at A1
    Above attachment index maybe different

The problematic OLE objects:
• Display only as a static icon image
• Cannot be double-clicked to open the embedded file
• Are positioned at A1 regardless of SetPosition() calls
• The actual file content is NOT embedded (only the icon graphic)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions