cancel
Showing results for 
Search instead for 
Did you mean: 

Sapui5 export to excell Invalid character error on mobile

0 Kudos

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();
        });

Accepted Solutions (0)

Answers (0)