You must Sign In to post a response.
  • Category: ASP.Net MVC

    Excel data reader in windows server 2012 r2

    Excel data reader is fine in windows server 2008, now my site is migrated to windows server 2012 r2.
    Now my code is not working, unable to read the excel files. Any idea on this is really appreciated.
    Thanks Q.
    Lavanya
  • #768213
    Hi Lavanya,

    You better try with OpenXml open source library to read a excel file. This is available in nugget "DocumentFormat.OpenXml". The below url will help you to read a excel file using openxml.
    http://www.aspsnippets.com/Articles/Read-and-Import-Excel-data-to-DataTable-using-OpenXml-in-ASPNet-with-C-and-VBNet.aspx

  • #768224
    Hi,

    If you do not want to install Excel on server then you can use OpenXml as Saravanan suggest. There are also 3rd party libraries if you do not want to handle with lots of code.
    https://visualstudiogallery.msdn.microsoft.com/81c33294-eee9-4683-9cee-a5714cfebf34

  • #768226
    can you share your code with us ? how do you read excel, are you using OLEDB object or what ?
    Please explain so that we can help you better in order to resolve the issue

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]


Sign In to post your comments