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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Not able to export a view

(0) ShareShare
ReportReport
Posted on by 437

Hi Guys, 

I am trying to export a view in excel but it get hung up.

This view created under Opportunity Entity where we are fetching some fields of opportunity  and Accounts Entity.

b1.PNG 

When I select "Open Excel in on line" i get bellow error

6622.b2.PNG

Log file 

<s:Envelope xmlns:s="schemas.xmlsoap.org/.../envelope"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">A duplicate column heading exists.</faultstring><detail><OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance"><ActivityId>3933b1d4-5bfe-4ca1-9aaa-3ab6bf1d774d</ActivityId><ErrorCode>-2147220680</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic"><KeyValuePairOfstringanyType><a:key>ApiExceptionSourceKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">Plugin/Microsoft.Crm.ObjectModel.ExcelService</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiOriginalExceptionKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">Microsoft.Crm.CrmException: A duplicate column heading exists. ---&gt; Microsoft.Crm.CrmException: A duplicate column heading exists.
at Microsoft.Crm.ObjectModel.CrmTableAdapter.GenerateColumns()
at Microsoft.Crm.ObjectModel.CrmTableAdapter.get_Columns()
at Microsoft.Crm.ObjectModel.CrmTableAdapter.GenerateRows()
at Microsoft.Crm.ObjectModel.CrmTableAdapter.get_Rows()
at Microsoft.Xrm.Office.ExcelGenerator..ctor(ISpreadsheet spreadsheet, ITemplate template, Boolean enableExcelTemplatePerfFix)
at Microsoft.Crm.ObjectModel.ExcelService.GenerateXlsx(CrmTableAdapter crmTableAdapter, ITemplate template, ExecutionContext executionContext)
at Microsoft.Crm.ObjectModel.ExcelService.&lt;&gt;c__DisplayClass5_0.&lt;ExportToExcelInternal&gt;b__0()
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.ObjectModel.ExcelService.ExportToExcelInternal(EntityReference view, String fetchXml, String layoutXml, String queryApi, InputArgumentCollection queryParameters, ExecutionContext executionContext)
at Microsoft.Crm.ObjectModel.ExcelService.ExportToExcel(EntityReference view, String fetchXml, String layoutXml, String queryApi, InputArgumentCollection queryParameters, ExecutionContext executionContext)
at Microsoft.Crm.ObjectModel.ExcelService.&lt;&gt;c__DisplayClass15_0.&lt;ExportToExcelOnline&gt;b__0()
at Microsoft.Crm.ObjectModel.ExcelService.ExportExcelToExcelOnline(EntityReference entityReference, String fetchXml, Func`1 generatorFunction, String queryApi, InputArgumentCollection queryParameters, ExecutionContext executionContext)
at Microsoft.Crm.ObjectModel.ExcelService.ExportToExcelOnline(EntityReference view, String fetchXml, String layoutXml, String queryApi, InputArgumentCollection queryParameters, ExecutionContext executionContext)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass2_1.&lt;Execute&gt;b__0()</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiStepKey</a:key><a:value xmlns:b="schemas.microsoft.com/.../Serialization" i:type="b:guid">9edf2c3a-95f2-4d79-b623-beabe0d0d934</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiDepthKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:int">1</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiActivityIdKey</a:key><a:value xmlns:b="schemas.microsoft.com/.../Serialization" i:type="b:guid">3933b1d4-5bfe-4ca1-9aaa-3ab6bf1d774d</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiPluginSolutionNameKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">System</a:value></KeyValuePairOfstringanyType><KeyValuePairOfstringanyType><a:key>ApiStepSolutionNameKey</a:key><a:value xmlns:b="www.w3.org/.../XMLSchema" i:type="b:string">System</a:value></KeyValuePairOfstringanyType></ErrorDetails><Message>A duplicate column heading exists.</Message><Timestamp>2018-09-29T18:39:09.7896289Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true"/><InnerFault><ActivityId>3933b1d4-5bfe-4ca1-9aaa-3ab6bf1d774d</ActivityId><ErrorCode>-2147220680</ErrorCode><ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic"/><Message>A duplicate column heading exists.</Message><Timestamp>2018-09-29T18:39:09.7896289Z</Timestamp><ExceptionRetriable>false</ExceptionRetriable><ExceptionSource i:nil="true"/><InnerFault i:nil="true"/><OriginalException i:nil="true"/><TraceText i:nil="true"/></InnerFault><OriginalException i:nil="true"/><TraceText i:nil="true"/></OrganizationServiceFault></detail></s:Fault></s:Body></s:Envelope>

Kindly help 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi,

    This is common error and it's because you have choose column with same name in the view.

    Remove the duplicate column from view , publish all customization and then export again.

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    As the error message suggest, you have a duplicate name in the column heading i.e. you have a field which exists more than once in that view. Check the view you are exporting and find out any field which has the same name. Once find, either change the field name or remove that field from the view.

    You can also create an advance find view and export data from there if required.

    Hope this helps.

  • Suggested answer
    yleclerc Profile Picture
    1,549 on at

    I may be wrong, but the Duplicate name does not have to be in the view. Even if it's not in the view, but it's in the entity, the export will fail.

    You have to make sure every field has a different Display Name.

  • Verified answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi,

    Make sure you don't have two fields in the exported entity with the same Display Name. The export will fail because of this reason.

    nishantrana.me/.../duplicate-column-heading-exists-error-while-using-templates-for-data-import-in-crm-2015

    Hope this helps.

  • windyMill Profile Picture
    437 on at

    Thanks I will try this  because i checked in view column header was repeated.

  • windyMill Profile Picture
    437 on at

    Thanks it worked

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans