Option to remove column headers in data export in SAPUI5

Viewed 234

I am exporting data from SAPUI5 app using Export and ExportTypeCSV controls from sap.ui.core.util library in txt and xls formats using fileExtension property.

The columns are being set as below:

columnTemp = [{
                    name: "Column 1",
                    template: {
                        content: "{Column1Path}"
                    }
                }, {
                    name: "Column 2",
                    template: {
                        content: "{Column2Path}"
                    }]

The columns headings are not required to be a part of the downloaded files since the files are to be processed further containing just the data. If I don't set the 'name' itself, and create each entry using just 'template', then the result is achieved but a blank line exists at the top of the file.

Is there another way to remove column headers for all fields in the file? Or should I consider sap.ui.export.Spreadsheet control? (I was unable to find file-extension-like property for it)

Kindly assist.

0 Answers
Related