I'm attempting to provide a CSV/Excel export from a Worklist template I've created. Have followed some examples but although I'm creating the file successfully with the column headers, I'm getting no rows back.
The worklist view included a series of filters which filter the results back and show the table on the "search" button click. I then show the "export" button in the toolbar (circled in red) and the click event SHOULD export the results of the filtered table. It doesn't though.
Any ideas why the excel/csv doesn't show the data? Am I missing a rebind of the data in the event handler before it's rendering the file?
Cheers
Tony
Request clarification before answering.
JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.table.Table
check if this one catch u....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Jun Wu for the helpful advice and the link.
According to the documentation, my code seems to be ok.
onDataExport: function() {
var oExport = new sap.ui.core.util.Export({
// Type that will be used to generate the content. Own ExportType's can be created to support other formats
exportType: new sap.ui.core.util.ExportTypeCSV({
separatorChar: ","
}),
// Pass in the model created above
models: this.getView().getModel(),
// binding information for the rows aggregation
rows: {
path: "/Outputs"
},
// column definitions with column name and binding info for the content
columns: [{
name: "EKORG",
template: {
path: "EKORG"
}
}, {
name: "WERKS",
template: {
path: "WERKS"
}
}, {
name: "MATKL",
template: {
path: "MATKL"
}
}, {
name: "DIST",
template: {
path: "DIST"
}
}]
});
//this.doSearch();
// download exported file
oExport.saveFile().catch(function(oError) {
sap.m.MessageBox.error("Error when downloading data. Browser might not be supported!\n\n" + oError);
}).then(function() {
oExport.destroy();
});
},
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.