spreadsheetimporter / ui5-cc-spreadsheetimporter Goto Github PK
View Code? Open in Web Editor NEWA UI5 Component to integrate a Spreadsheet Upload for UI5 Apps.
Home Page: https://spreadsheet-importer.com/
License: Apache License 2.0
A UI5 Component to integrate a Spreadsheet Upload for UI5 Apps.
Home Page: https://spreadsheet-importer.com/
License: Apache License 2.0
maybe option also to override this
improve this line
https://github.com/marianfoo/ui5-cc-excelUpload/blob/27572e52082d63f85b2fb67936069eb4b94dca39/src/controller/ExcelUpload.ts#LL75C4-L75C74
let tables = domRef.querySelectorAll("[id$='::LineItem-innerTable']");
maybe with something like this
sap.ui.core.Element.registry.filter(function(element){
if(element.isA("sap.m.Table")){
console.log(element.isActive())
return element
}
})
or
this.test = sap.ui.getCore().byId("ui5.isu.msb.createmeterread::RunObjectPage").findElements(true).filter(function(element){
if(element.isA("sap.m.Table")){
console.log(element.isActive())
return element
}
})
the module should be able to be deployed in a FLP context with multiple versions on a single app.
As in:
The problem is currently that the namespaces in the FLP collide.
That means when a user calls App1 the module is called with v0.1.0 and the namespace thirdparty.customControl.excelUpload
.
If the user calls App1 afterwards the module will not be loaded again because the namespace is the same.
That means the modules should be in the namespace of the app.
The ui5-tooling-modules for example does this with the parameter addToNamespace
but only with non-ui5 modules.
read out the metadata what mandatory fields are (i.e. from RAP CAP Annotations)
Check if these fields are present
A dedicated Button Control which can be added to XML Views
Status | Count |
---|---|
π Total | 167 |
β Successful | 159 |
β³ Timeouts | 0 |
π Redirected | 0 |
π» Excluded | 7 |
β Unknown | 0 |
π« Errors | 1 |
donΒ΄t like throwing of error message
https://github.com/marianfoo/ui5-cc-excelUpload/blob/d07468833e292392f70a8fcd3ed2d95c473ef216/src/controller/ExcelUpload.ts#L209
if any other error thrown, the error dialog ist still shown
https://github.com/marianfoo/ui5-cc-excelUpload/blob/d07468833e292392f70a8fcd3ed2d95c473ef216/src/controller/ExcelUpload.ts#L216
Some Apps already have error handling like OData V4 FE
Could be a MessageHandler available
Maybe offer option to show errors/handle error by excelUpload or handle Errors by Developer
show how many rows
maybe preview as tableview
Able to use this in a Object Page and List Report with V2/V4
If you have defined a columns
option do check only for them
from v0.9.1
to v0_9_1
Status | Count |
---|---|
π Total | 165 |
β Successful | 157 |
β³ Timeouts | 0 |
π Redirected | 0 |
π» Excluded | 7 |
β Unknown | 0 |
π« Errors | 1 |
first check if this is actually helpful and possible
Status | Count |
---|---|
π Total | 201 |
β Successful | 190 |
β³ Timeouts | 0 |
π Redirected | 0 |
π» Excluded | 7 |
β Unknown | 0 |
π« Errors | 4 |
to avoid errors, check for duplicat label names
refer to #29
also the two fieldMatchTypes
Currently, the data types expected are those specified by the metadata.
However, it is possible that other data types are transferred which lead to error in code or in backend.
No error message is shown currently.
Possible Datatypes to check:
May be check while parsing data.
Other (more complicated option) is to check the datatypes provided by SheetJS
https://docs.sheetjs.com/docs/csf/cell/
Need to inform user about wrong data type
Lot of options are available at design time to the developer
It should be also possible to define which options the user can set at run time
Rewrite in Controller and a new fragment needed
@deprecated
(since 1.95) - Please use sap.ui.core.Component.create Component.create instead.
In have added excel upload function to List Report page.
The controller code is below and "batchSize" is set to 1, meaning that each record is to be sent in a separate batch.
this.excelUpload = await this._controller.getAppComponent().createComponent({
usage: "excelUpload",
async: true,
componentData: {
context: this,
activateDraft: true,
columns: ["description", "customer_ID"],
mandatoryFields: ["customer_ID"],
batchSize: 1
}
})
For the first record, draft activation is successful. However, for the second record draft activation fails.
In _getActionName method, oContext.getModel() returns undefined for the second record.
In have added excel upload function to List Report page.
The controller code is below and "activateDraft" is set to false.
this.excelUpload = await this._controller.getAppComponent().createComponent({
usage: "excelUpload",
async: true,
componentData: {
context: this,
activateDraft: false,
columns: ["description", "customer_ID"],
mandatoryFields: ["customer_ID"],
batchSize: 0
}
})
When I uploaded a file, records got activated. So, it seems activateDraft property is not checked.
Hello,
I have a problem when deploying to my on-promise environment.
On the first attempt (deploy new) it generates the app normally, but on subsequent attempts it returns this error:
I redid all the configurations... even before this version, it was working normally.
If anyone can help me I would be very grateful!
error Message or Warning
Error Message when no columns found at all
after refactor to typescript, not every file is loaded from component-preload.js
Status | Count |
---|---|
π Total | 163 |
β Successful | 150 |
β³ Timeouts | 0 |
π Redirected | 0 |
π» Excluded | 6 |
β Unknown | 0 |
π« Errors | 7 |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.