Skip to Content
0

Read content from .XLSX file to sap.m.table

Jan 08 at 10:58 PM

65

avatar image
Former Member

Hi,

I have an sap.m.table control in my application. The table is getting populated with data from DB in JSON format.

There is a requirement that requires the table data to be populated based on the content of the .XLSX file which will have the same format as the DB table data.

I need help with the code that can do following:

Browse to a .XLSX file on the local machine.

Read the content from the .XLSX file and provide the output as JSON.

Populate sap.m.table with the output JSON.

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

1 Answer

Ivan Mirisola
Jan 10 at 05:50 PM
0

Hi Anoop,

Do you mean your app will need be able to have an upload function that will "parse" the Excel sheet and display it in a UI5 Table using JSON format? Maybe this would help... Here is a question done on this subject via SAP Community as well.

Since you already have the data on a DB, why not upload it via JDBC connection directly from Excel?

Or better yet. Why don't you connect to your DB from Excel to display the table and edit it directly from Excel?

Having the upload feature will give you much more work to maintain this app. You will need to use a JS library to parse the Excel file, looking after predefined column names. If the user changes the column names, your app behave awkwardly.

Regards,
Ivan

Share
10 |10000 characters needed characters left characters exceeded