Skip to Content
0

SAPUI5 upload data xlsx, xls to table

Jan 18 at 08:20 AM

240

avatar image

Hi,

I've followed below blog and was getting error that read is undefined which is asked on the last comment. Any idea on the actual solution to upload xlsx and xls file to sapui5 table?

Read contents of Excel file into Sapui5 table

Regards,

-Ben-

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Arjun Biswas Jan 18 at 08:50 AM
0

Hi Yen Shen, Ben Lim,

The variable name they have used is "reader". Could you check once with that. Go through the foll. blogs to know more on uploading excel data in SAPUI5 :

https://blogs.sap.com/2017/05/17/sapui5-ms-excel-file-upload/

https://blogs.sap.com/2015/07/17/excel-file-upload-in-sapui5master-data-upload-using-sapui5/

http://codetheory.in/parse-read-excel-files-xls-xlsx-javascript/

Hope this helps,

Regards,

Arjun Biswas

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Hi @Arjun Biswas,

The 1st link and 2nd link you shared are cater for csv format.

The 3rd link is using the 3rd party library. Same like the library shared in the blog I mentioned.

Why XLSX.read is undefined as there is no syntax error on my code as I've defined the library at top sap.ui.define.

Regards,

-Ben-

111.png (29.0 kB)
0

Could you log the "XLSX" object and check. As per my understanding, I think you are not getting the required object reference there.

Regards,

Arjun Biswas

0

Ya, I tried log the XLSX object, is undefined. Below is my xlsx file locate and my declaration. Which part do I missed out in order to get the library object?

Regards,

-Ben-

111.png (43.9 kB)
0

Hi Ben,

I am not sure, which part you might have missed, but I think that this error is caused due to the resource roots, i.e. your controller is not able to access the xlsx.js file.

Regards,

Arjun Biswas

0