Skip to Content
0

How to Export filtered and sorted data from sap.m.Table to an Excel File ?

Mar 29, 2017 at 03:00 PM

776

avatar image
Former Member

Hi Experts,

I need to export data to an Excel file(not CSV) from a sap.m.Table.

The data displayed on the table is both filtered and sorted.

Can you please suggest some code to implement that.

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

3 Answers

avatar image
Former Member Apr 03, 2017 at 04:01 PM
0

Hi,

Please go through below, but there a issue for data formats

https://answers.sap.com/questions/167183/export-to-excel-exporttypecsv-data-formatted-prepe.html

Share
10 |10000 characters needed characters left characters exceeded
Jun Wu Apr 04, 2017 at 03:55 PM
0

you need external js lib to do the job or use the standard odata service which support xlsx export.

Share
10 |10000 characters needed characters left characters exceeded
Wouter Lemaire
Apr 04, 2017 at 06:45 PM
0

You could use the smarttable control: https://sapui5.hana.ondemand.com/explored.html#/entity/sap.ui.comp.smarttable.SmartTable/samples

Inside the smarttable is a table control where you can add filters to by accessing the table like this:

var table = this.byId("idOfTheSmartTable").getTable();
var oObjectBinding = oObject.getBinding("items"); 
oObjectBinding.filter(<filter>);

Kr,

Wouter

Share
10 |10000 characters needed characters left characters exceeded