Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Access Excel sheet from a plugin

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Everyone,

I have a requirement where the data is mapped in an excel sheet based on a lookup value user names assigned to that lookup value in that excel sheet needs to be retrieved, this template has around 210+ records the most inefficient way of doing it would be to write if else statements for all of them. Also since this data mapping doesn't need to be present in the system, I ruled out the option of creating a new entity by converting excel sheet into records of that entity, the only efficient option I feel is being able to access this excel sheet as part of the plugin project file and do retrieve the user value from the sheet based on the entity's lookup value. When I tried doing that I got the below error

An exception has occurred in the [Wendys.Crm.Plugins.ProjectMilestoneGenerator].
An unhandled exception has occurred during execution of the plugin.
{System.TypeLoadException} from {Wendys.Crm.Plugins} - Could not load type 'Microsoft.Office.Interop.Excel._Application' from assembly 'Wendys.Crm.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bb2727b96c9cb15e'. The type is marked as eligible for type equivalence, but the containing assembly is not loaded as fully trusted.

Please let me know if any one has experienced this previously or do have any suggestions.

Thanks in advance,

Vinod

*This post is locked for comments

  • Suggested answer
    Preeti Sharma Profile Picture
    Preeti Sharma 2,678 on at
    RE: Access Excel sheet from a plugin

    Hi,

    Dynamics 365 does not allow external dlls . You can use ILMerge and then try to deploy plugin again.

    Below link may help you:

    community.dynamics.com/.../using-ilmerge-for-plugin-in-crm

    Hope this helps:)

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Access Excel sheet from a plugin

    Hi,

    you need to use ILmerge to merge the dlls.

    community.dynamics.com/.../296352

    www.microsoft.com/.../details.aspx

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans