Skip to content

.xlsx read without installed ms office on server

Digamber Patil

Asked Jun 15, 2011, 2:15 AM EDT8 answers
Share
LinkedInX
.xlsx read without installed ms office2007 on server.

any other way to read xlsx file without office driver

7 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Yes but How.
    Can you give me a sample code for that so i can implement that one.
    0
  • 0
    Which Dll or driver need to be download for OLEDB
     (MY config is Win7 Enterprise, ASP.net 3.5 )
    0
  • Suthish Nair
    0
     using System.Data.OleDb;

     using (OleDbConnection obj = new OleDbConnection())
     {
           obj.ConnectionString = "---";
           obj.Open();
            using (DataTable dt = obj.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null))
            {

            }
     }

     http://www.connectionstrings.com/excel
    0
  • 0
     I get the following error :---

    The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
    0
  • Suthish Nair
    0
    Ok you are missing Office data providers

    Download from here and install the drivers..
    0
  • 0

    Hi Digamber, here is another way you can try, just add this .NET DLL for workbooks (Excel files).

    It is pretty easy to use it, for example here is how you would read excel workbooks in C# code behind:

    C#
    // Load Excel file.
    var workbook = ExcelFile.Load(excelStream, LoadOptions.XlsxDefault);
     
    // Select active worksheet.
    var worksheet = workbook.Worksheets.ActiveWorksheet;
     
    // Retrieve the value of first cell.
    var value = worksheet.Cells["A1"].Value;
    0
  • 1 short reply
    • Suthish Nair
      0
      using oledb...
      0