asp.net mvc read / write Excel with formula RRS feed

  • Question

  • User-1961814522 posted

    Hi all,

    I am trying to read and display excel contents in asp.net mvc page.

    After displaying the excel contents, i am trying to download the details in excel from the mvc view page. The excel contents downloaded needs to have formula intact.

    Can someone provide solutions about how we could achieve this.



    Tuesday, September 1, 2020 12:38 PM

All replies

  • User-474980206 posted

    You use the open xml sdk to read and write office documents.


    you will need to write code to display the excel sheet. The sdk will read the formulas, but not execute them. This will not be easy, so you will probably need to buy a solution.

    the download is simple, just return a file with the correct content type and disposition.

    Tuesday, September 1, 2020 2:51 PM
  • User1686398519 posted

    Hi ashvinvee,

    Do you mean not only want to read or write data but also be able to read or write formulas?

    You can install Syncfusion.XlsIO.AspNet.Mvc5 through NuGet to meet your needs.You can refer to this document for detailed code.

    • sheet.Range["C1"].Formula;//Read Formula

    Best Regards,


    Wednesday, September 2, 2020 9:36 AM