web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Exporting To Excel Without Export To Excel Privilege

(0) ShareShare
ReportReport
Posted on by 142

I know the title looks like an oxymoron but let me explain. 

The requirement is to have a button on the Account entity that allows a user to export to Excel/CSV data from a select entity and it's child entity. However the ability to OOB Export to Excel needs to be disabled for data security reasons.

What is the best approach for this? I have considered a 3rd party site that connects to the web service and dynamically constructs the data and presents as a file download. Is there another way here that doesn't need a 3rd party site?

Any advice appreaciated

Jon

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi viperdudeuk ,

    you have 3 possibilities:

    1) Full excel format > Plugin + OpenXml (or external component) + ILMerge: create a plugin which build a full xml file by OpenXml library, create an annotation record with xlsx extension and attach it to your entity, then merge openxml dll to your plugin and register it

    2) Fake excel format > Plugin: create a plugin which build a html string, create an annotation record with xls extension, and attach it to your entity, then merge openxml dll to your plugin and register it

    3) CSV format > Plugin: create a plugin which build a csv string, create an annotation record with csv extension, and attach it to your entity, then merge openxml dll to your plugin and register it

    Hope it helps.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • ashlega Profile Picture
    34,477 on at

    One other option:

    Customize "export to excel" button using Ribbon Workbench - probably use a "Custom rule" to hide that button for the entities where you don't want to show it (I think you'll find it in the application ribbons), so it will be somewhat similar to this:

    www.itaintboring.com/.../application-ribbon-in-dynamics-or-how-can-we-add-a-button-to-all-entity-forms

    Technically, it won't be relying on the security model.. but, since there will be no button on those entities where the users should not be able to export, it might be good enough

  • viperdudeuk Profile Picture
    142 on at

    Thank you for the responses.

    In the end I created a button in Ribbon Workbench and then called a bit of Javascript that calls a URL on another server. I then used Python to create the CSV and send it back with the required HTTP headers to download it on to the users machine.

    After discussion the client preferred this to having the file annotated to the entity record.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans