on 2024 Aug 06 9:06 AM
Hi all,
I'm getting an error while downloading the file into excel (Uncaught TypeError: sap.ui.core.util.ExportTypeCSV is not a constructor). on
Make sure to declare the dependent modules in the dependency list of sap.ui.define or sap.ui.require.
sap.ui.require([ // Require and initiate those modules on-demand
"sap/ui/core/util/Export",
"sap/ui/core/util/ExportTypeCSV",
], (Export, ExportTypeCSV) => {
const export = new Export({
exportType: new ExportTypeCSV({/*...*/}),
// ...
});
// ...
})
Generally, modules can be part of a preloaded library bundle (here: sap/ui/core/library-preload.js), but they still need to be properly required or declared like in my code snippet above. Do not rely on the global name of the module export either.
While classes like sap.ui.core.util.Export and sap.ui.core.util.ExportTypeCSV are deprecated, deprecated modules will be removed only in the next major release e.g. when upgrading from SAPUI5 1.x to 2.x.
Please review the section "Defining and Requiring Modules" and the rest from Best Practices for Developers - SAPUI5 documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.