0

I am trying to create an excel file from gembox ExcelFile in asp.net web api and let it be downloaded from angular 5 application. But, the downloaded file says it is corrupt and when opened, random and unwanted texts are displayed along with the original data that is required. Here's the server side response: enter image description here

Here's the client side request : enter image description here

This is the server side code : enter image description here

Here's how I am trying to get it from the client : enter image description here

Any help would be appreciated.

Subash Kharel
  • 478
  • 1
  • 3
  • 12
  • Can you try downloading the spreadsheet without using Angular, does the same problem occur? If problem remains, can you upload somewhere a small test project so that I can take a look at it? Last just as an FYI, in the future consider providing the snippet codes as text not as images. Can you imagine if everyone on StackOverflow was providing code as screenshot, every answer being served as an image... !?!? – Mario Z Apr 27 '18 at 11:20
  • Also, I see that there is a green squiggly line below SaveXls, SaveXlsx and SaveCsv methods. Those methods are obsolete, even though they work fine, you should consider using a unified Save method instead. – Mario Z Apr 27 '18 at 11:23

0 Answers0