0

I have an upload functionality where user uploads excel sheet and backend api is expecting the result in JSON format of the entire data as input as shown below

[{
"LineNumber": "1",
"Parma": 123,
"PartNumber": 234,
"TestQual": "AQ",
"UOM": "LIT",
"TestCode": "RME",
"Weight1": 234,
"Weight2": 235,
"Weight3": 10,
"IsValid": true,
"ValidationMessage": "test"

}, {
"LineNumber": "2",
"Parma": 321,
"PartNumber": 455,
"TestQual": "AQ",
"UOM": "LIT",
"TestCode": "RME",
"Weight1": 290,
"Weight2": 200,
"Weight3": 20,
"IsValid": true,
"ValidationMessage": "test"

}]

Likewise if the excel has 100 records , we need JSON array with all the data.

I have checked for available options in Kendo but I could not find anything, help me with your ideas. Thank you.

Giannis
  • 1,790
  • 1
  • 11
  • 29
BKK
  • 340
  • 2
  • 4
  • 15
  • 2
    Well, it's not a custom to process files on the client-side, but if you cant change API then use some external library for opening files on the client-side, build JSON then send request to API. Its more JS, TS, Angular question than Kendo question. Check this https://stackoverflow.com/questions/48112236/read-excel-file-in-angular-2 – dev_in_progress Oct 21 '21 at 08:02

1 Answers1

1

This may be a late reply, but answering hoping it helps other users.

There is a npm package which converts excel input to JSON data , repository details is available at npm package.

Since it is a private package, enterprise usage should be limited and one must be vigilant about support or upgrades.

  • 1
    Thank you. I have handled the requirement on the server side, so I get a JSON response on the post service call. – BKK Dec 15 '21 at 09:38