
The UI5 Spreadsheet Importer is an open-source custom control that allows you to upload and download data in Excel files directly to and from SAPUI5/OpenUI5 applications. It automatically maps columns to OData properties, handles validation, and supports large datasets through batching. Whether you’re using SAPUI5 on-premise, SAP BTP, or even OpenUI5, this control simplifies Excel-based data maintenance. Its flexibility extends to various backend OData versions, enabling you to integrate with different systems without modifying the backend.
Key advantages include:
This control is also used in real production scenarios to speed up data upload and reduce manual input errors. Many organizations rely on Excel as a data-handling tool, and the UI5 Spreadsheet Importer helps them bridge the gap between the Excel environment and SAP UI5 apps.
Up to this point, the UI5 Spreadsheet Importer primarily focused on creating new records. However, in real-world applications, updating existing data is just as important. The new Update feature covers exactly this need with the just released version v1.7.2
With the Update capability, you can:
This feature is especially beneficial in scenarios where you have to correct, adjust, or enrich multiple records at once. By leveraging Excel’s powerful manipulation tools, you can reduce repetitive tasks and expedite changes.
Upsides:
Downsides / Considerations:
To try out the update feature, the recommended approach is:
You can see an example in our Live Demo here: Live Demo for Orders (V4 Freestyle).
A sample setup with CAP and Fiori Elements here: GitHub: UI5 Spreadsheet Importer CAP/Fiori elements Update
Below is a simple code snippet that demonstrates how to configure the UI5 Spreadsheet Importer to perform updates instead of creates. You only need to change the "action" property.
this.spreadsheetUploadUpdate = await this.editFlow.getView().getController().getAppComponent()
.createComponent({
usage: "spreadsheetImporter",
async: true,
componentData: {
context: this,
tableId: "ui.v4.ordersv4fe::OrdersObjectPage--fe::table::Items::LineItem-innerTable",
action: "UPDATE"
}
});
The complete Documenation is here: Docs: Update
Below is a more detailed example showing how to integrate the UI5 Spreadsheet Importer in a Fiori elements List Report. Here, you typically configure everything through a manifest.json and a small spreadsheet.js extension.
manifest.json (excerpt):
{
"sap.ui5": {
"componentUsages": {
"spreadsheetImporter": {
"name": "cc.spreadsheetimporter.v1_7_2"
}
},
"resourceRoots": {
"cc.spreadsheetimporter.v1_7_2": "./thirdparty/customcontrol/spreadsheetimporter/v1_7_2"
},
"routing": {
"targets": {
"BooksList": {
"type": "Component",
"id": "BooksList",
"name": "sap.fe.templates.ListReport",
"options": {
"settings": {
"contextPath": "/Books",
"controlConfiguration": {
"@com.sap.vocabularies.UI.v1.LineItem": {
"actions": {
"update": {
"press": "book.ext.spreadsheet.spreadsheet.update",
"text": "Update Excel"
},
"download": {
"press": "book.ext.spreadsheet.spreadsheet.download",
"text": "Download Excel"
}
}
}
}
}
}
}
}
}
}
}
spreadsheet.js (controller extension for the List Report):
sap.ui.define([
"sap/m/MessageToast"
], function(MessageToast) {
'use strict';
return {
update: async function() {
// Create component for update
this.spreadsheetUploadUpdate = await this.editFlow.getView().getController().getAppComponent()
.createComponent({
usage: "spreadsheetImporter",
async: true,
componentData: {
context: this,
debug: true,
action: "UPDATE",
tableId: "book::BooksList--fe::table::LineItem-innerTable",
columns: ["ID", "title", "description", "price", "stock", "author"]
}
});
this.spreadsheetUploadUpdate.openSpreadsheetUploadDialog();
},
download: async function() {
// Create component for download
this.spreadsheetDownload = await this.editFlow.getView().getController().getAppComponent()
.createComponent({
usage: "spreadsheetImporter",
async: true,
componentData: {
context: this,
tableId: "book::BooksList--fe::table::LineItem-innerTable"
}
});
this.spreadsheetDownload.triggerDownloadSpreadsheet({
deepLevel: 0,
addKeysToExport: true,
showOptions: false,
columns: {
"ID": {},
"title": {},
"description": {},
"price": {},
"stock": {},
"author": {}
}
});
}
};
});
When you click the upload button, the UI5 Spreadsheet Importer follows these steps internally:
Once the updates complete, your UI5 application typically refreshes its model bindings, immediately reflecting all changes. This process offers an efficient way to maintain large data sets without manual clicks in table rows.
If you have any questions or suggestions on the Update feature, please share them via GitHub Issues. Your feedback helps shape upcoming improvements, including broader OData V2 support, deeper draft handling, and extended performance options.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |