I am trying to create an API that will accept the representation of an Excel file from the client. I wish to return a List<List<string>> as JSON array after processing the first sheet. However, I cannot write the file to disk, and all processing must happen in-memory. What are the ways in which this can be achieved?
I've tried referring to various solutions on the internet but all of them involve writing the file to disk and then using that file for further processing. I'm open to solutions that involve
- Accepting base-64 representation of the file from the POST request body
- Accepting file as part of multipart/form-data request
- Any other standard request formats that accept files
The only condition is that the API should return a JSON array representation of the spreadsheet.