Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
igx-spreadsheet/ wookbook.save
posted

In our app we are allowing users to upload excel files and we put them in AWS S3 bucket.  Then in our app we have the ability to 'open' these files.  We are retrieving them from our server side and send them to our angular side and am able to open the file by using these lines:

const data = new Uint8Array(req.response);
Workbook.load(data, null, (w) => {

and then setting our spreadsheet.workbook = w and it loads.

What we are now trying (and failing at) is to allow changes to be made here and then on SAVE we want to get this result, send it to our server side and get it uploaded back to AWS as an excel file.

If i use the ExcelUtility for save  it saves it to the users computer along with the notification on screen that it has been placed in the download folder - I don't want that.

I have tried 

workbook.save(opt,(d) =>

and then uploaded the 'd' using a presignedURL, but when I directly download that file it opens as a json.

I hope I am expressing myself clearly here, is there a way to do what I want?

The only other thing I can think of is to save the file to the users computer and then grab that file and send it up to AWS via the same method that we originally uploaded to AWS via pre-signedURL.  But - this isn't really the desired approach.

Ours is an angular app, using typescript on the front end and C# on the server side.