cancel
Showing results for 
Search instead for 
Did you mean: 

Read file contents in UI5

vulturas
Explorer
0 Kudos

Hello everyone,

 

I've been trying to read two values from a .csv-File for several minutes now. I mean, it's a common task in any other programming language. In SAP UI5 it seems to be a bit tricky to implement.

I use FileUploader in my view.

 

...addEventListener('change', function ()...

... won't work.

 

this.getView().byId("fileUploader").attachChange(function(oEvent) {
    var oFile = oEvent.getParameters("files");

... won't work.

 

I don't want to upload the file in any way. I'd just like to get the values and push them into my array.

What am I missing?

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

WouterLemaire
Active Contributor
0 Kudos

Have you seen this one? https://community.sap.com/t5/technology-q-a/read-file-using-fileuploader/qaq-p/11642954

might be old but the concept should work

vulturas
Explorer
0 Kudos
Thank you, but this is not an appropriate solution since the index.html has to be modified here.