Skip to Content
0

Sapui5 export to excell Invalid character error on mobile

Jan 17 at 06:47 AM

30

avatar image

Hi everyone,

I have a Sapui5 application for export an entityset to excell. It works fine on web browser but when I try export on mobile(mobile browser and fiori client app) , I getting Invalid character Error(DOM Exception 5):This String contains error.How can I correct this issue. This is my code:

sap/ui/core/util/Export,
sap/ui/core/util/ExportTypeCSV
    ...
var that = this;
        this.oExport = new Export({
            exportType: new ExportTypeCSV({
                separatorChar: ";"
            }),
            models: oView.getModel(),
            rows: {
                path: vEntityPath,
                filters: this.oTableFilters
            },
            columns: [{
                name: "Field1",
                template: {
                    content: "{Field1}"
                }
            }, {
                name: "Field2",
                template: {
                    content: "{Field2}"
                }
            }{
                name: "Date",
                template: {
                    content: "{path:'Date',type:'sap.ui.model.type.Date',formatOptions:{style:'short'}}"
                }
            }}]
        });
        var vToday = new Date();
        var date = vToday.getDate() + "." + (vToday.getMonth() + 1) + "." + vToday.getFullYear();
        var vFileName = "File-" + date;
        this.oExport.saveFile(vFileName).catch(function(oError) {
            MessageBox.error(oError);
        }).then(function() {
            that.oExport.destroy();
        });
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers