Skip to Content
0

SAP UI5 - TreeTable Export to CSV / XLSX

Jun 13, 2017 at 02:57 PM

140

avatar image

Hi all,

I'm having trouble setting up the export of a UI5 TreeTable to CSV/Excel.

I'm using the following code:

var oTreeTable = this.getView().byId("TreeTableBasic");	
oTreeTable.exportData({
exportType: new sap.ui.core.util.ExportTypeCSV({separatorChar : ";"}),
    	columns : [{
		name : "test1",
		template : {
			content : "{test1}"
		}
	}]
}).saveFile().catch(function(oError) {
	console.log(oError);
}).then(function() {
	this.destroy();
});

When I open the application and start the download I get the following error:

TypeError: The property "sPath" of an undefined or null reference can not be opened.

There's not even a popup opening to ask for the location to save the file.

I already tried the same code with a standard table which worked fine.

Do you have any ideas how to fix this problem? I don't even know where to find the property "sPath".

Many thanks and best regards

Moritz

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers