Open an Excel file without Office installed on the server RRS feed

  • Question

  • Hi,

    I have webpage in which I have a button. I am trying to open an excel file from a network location when clicked on a button, but we don't have office installed on the server. Since I am using Microsoft.office.interop.excel.dll , it was working on my local computer but when i host this on the server, it is throwing errror. Is there any way i can open an excel file without office installed. Below is the code I am using.

            Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();
            excelApp.Visible = true;

    Tuesday, September 11, 2018 5:20 PM

All replies

  • Hi, this will open an excel file with the default associated application:


    You can't use Microsoft.Office.Interop.Excel without having Microsoft office installed.

    Tuesday, September 11, 2018 5:58 PM
  • It is giving me access denied error. I have checked the security on the folder. evertything seems correct

    Tuesday, September 11, 2018 6:11 PM
  • Hi vinisha9,

    Thank you for posting here.

    Since your question is more related to office, you could post a new thread in Office forum for suitable support.


    The Visual C# forum discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, September 12, 2018 7:28 AM