Skip to Content
1
Jun 11 at 08:28 PM

How to upload the Excel file into the backend by using Odata service?

185 Views Last edit Jun 11 at 08:49 PM 3 rev

Hello Colleagues,

Is there any way to upload the Excel file from frontend and send it to the backend by using Odata service? I was trying to store that Excel file as a blob type into the backend. There are two sheets in the Excel file. Therefore, I created two JSON objects to store each sheet and combined those two JSON Objects into one JSON object which was "json1".

The excel file data was stored into the blob successfully and the size of the blob is 12650. When I console out the "json1" and all the excel data could print it out.

Because the blob is about a list of binary data. ( var blob = new Blob([arraybuffer]) Therefore, I was trying to convert the JSON object into the base64 string on the line 366. And then I converted the base64 string into the arraybuffer as the blob part.

The error message was "Request contains properties that do not exist in entity".

Is this the correct way to upload the Excel file as a blob type into the backend by using Odata service? Or Can any one provide the reference links on how to upload the Excel file into the backend by using OData service?

The backend table:

The oData service

Thank you!

Wanzhen

Attachments

frontenderror.png (174.8 kB)
odataservice.png (7.9 kB)
backendtable.png (38.0 kB)