Search code examples
c#exceloledb

Do I need to have Excel installed to query spreadsheets using an OleDB Provider?


I am working on some software that uses an OleDB to open a .xls file, query some data, and fill a dataset with the results. I am now looking at using this software on systems that do not have Excel. Will my software still be able to read the spreadsheets?

This xls file contains 1000s of configuration settings that my software uses. If this setup won't work on computers without Excel, I'm guessing my next best move is to convert the xls file to an XML file and read it in using XML Services.


Solution

  • You don't have to have office or the office data connectivity installed, you can use the Jet for OleDB engine which is installed on pretty much every windows machine in existence. However it's very old technology and is limited to 32 bit.

    http://msdn.microsoft.com/en-us/library/ms175866.aspx

    If you want to avoid this mess entirely then switch over to an app.config file or a properties file and you can get the pure .net solution.