cancel
Showing results for 
Search instead for 
Did you mean: 

Upload the Excel File (.xlsx) to sap.ui.table in SAPUI5 (using SAPUI5 Standard Controls)

former_member494689
Participant
0 Kudos
2,636

Hi Experts,

How can upload the excel file data (.xlsx) to sap.ui.table model data using SAPUI5 standard controls?

Please kindly provide references/samples. (※if possible, do not want to use third-party JS library)

Best Regards,

Thiri

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member540067
Active Participant
former_member494689
Participant
0 Kudos

Hi Anmol Chadha,

Thanks for quick feedback.

In your blog, xlsx.js library is using to read excel data to json data.

Instead of this, I would like to use sapui5 standard control. Is it possible?

For example, we can use FileReader.readAsText for CSV upload.

Best Regards,

Thiri

former_member494689
Participant
0 Kudos

Hi Anmol Chadha,

Here is my code. But it doesn't work.

var file1 = oFileUploader.getFocusDomRef().files[0];

if (file && window.FileReader) {

var reader = new FileReader();

reader.onload = function(e) {

var strResult = e.currentTarget.result;

};

reader.readAsText(file, 'ISO-8859-1');

}

Best Regards,

Thiri