Skip to content

ProgId/Guid for Custom Task Pane Helper #373

@p0n3

Description

@p0n3

Problem
There is no easy way to set ProgId/Guid for a Custom Task Pane Helper component (ExcelCustomTaskPaneAddIn), which might cause a problem in restricted environments.

Details
ExcelCustomTaskPaneAddIn is an internal class and the instance is being created in the GetCTPFactory method inside CustomTaskPaneFactory:

// Register and create addin
_addin = new ExcelCustomTaskPaneAddIn { DnaLibrary = DnaLibrary.CurrentLibrary };
ExcelComAddInHelper.LoadComAddIn(_addin);

LoadComAddIn checks if the class has ProgId/Guid attribute, and if not it generates id based on the xll path. It works well if you e.g. extend ExcelRibbon class, but ExcelCustomTaskPaneAddIn is an internal class, so you cannot do much with it, therefore it always uses generated id.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions