Identify Duplicate Column Names in Dynamics 365 Using Excel
Here’s a little how-to video that helps how to use Excel to solve the otherwise monotonous process of identifying duplicate column headers in Dynamics 365 / Dynamics CRM (or in any table on a web page). This addresses the underlying issue of the Failed to Generate Excel error message that shows up when clicking Export to Excel.
Background: Failed to Generate Excel
Microsoft Dynamics CRM (now Dynamics 365) has a great feature that lets you export to Excel very easily to use either Excel Online or Desktop edition to play with the data.. Unfortunately, it sometimes gives a nondescript error when exporting “Failed to Generate Excel”, which appears if two column titles (fields) in the export have the exact same name.
This could be an issue if your organization has a custom field with the same name as an out-of-the-box field and both are included in the view.
Manually identifying duplicate column names is an annoying and often slow process unless the columns happen to be in alphabetical order (and they never are). It would be easy to sort in Excel though…
- Take advantage of the fact that under the pretty interface, the grid is actually just a table
- Click-and-drag the text to highlight the column headers in the web page.
- Copy to clipboard, then paste into Excel.
- Copy and “Paste Special”–making sure to “Transpose” (rotate) data from columns to rows in Excel
- Sort this list alphabetically and review for duplicates, then remove duplicates from the CRM view
Note, this is something I use a lot for one-off applications–but there are better ways to do this for the same page on a frequent basis.