cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate column headers in Export excel of SAPUI5 application

Former Member
0 Kudos

Hi all,

I am trying to download the content from a smart table in UI5 application, on click of export to excel Icon, the data is being downloaded but with duplicated column headers (with content).

Can anyone please let me know the solution, thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

CristianBabei
Contributor
0 Kudos

Probably you are not defining well the Key of the columns. Here is an example, for sap.ui.table:

<st:SmartTable>
	<st:customToolbar>
	</st:customToolbar>
	<st:customData>
		<core:CustomData key="dateFormatSettings" value='\{"UTC":true\}' />
	</st:customData>
	<st:layoutData>
		<FlexItemData growFactor="1" baseSize="0%" />
	</st:layoutData>
	<table:Table>
	        <table:Column tooltip="{path:'/#EntitySet/PropertyName/@sap:label'}" autoResizable="true" hAlign="Center" width="9em" leadingProperty="PropertyName" sortProperty="PropertyName" filterProperty="PropertyName">
			<Label text="{path:'/#EntitySet/PropertyName/@sap:label'}"></Label>
			<table:template>
				<Text text="{PropertyName}" />
			</table:template>
			<table:customData>
				<core:CustomData key="p13nData" value='\{"columnKey": "PropertyName", "columnIndex":"0", "leadingProperty": "PropertyName"}' />
			</table:customData>
		</table:Column>
	</table:Table>
</st:SmartTable>

If you are using the responsive table, tell me for an example 🙂

Hope this helps, if not solved using this, we can check your code.

Regards