tags:

views:

35

answers:

2

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.

+3  A: 

You need either the full Office or the Office Data Connectivity Components installed on the client computers.

driis
The Data Connectivity Components seem to be for Office 2010 and 2007. For Office 2003 spreadsheets, would I need the Primary Interop Assemblies?
Slider345
I think you can get away with using Jet for OleDB for older versions of Office.
driis
+1  A: 

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.

Justin
I'm using JET right now as my OleDB provider, so it sounds like it might still work on a computer without Excel.
Slider345
I am not sure Jet will be able to read Office 2010 files.
driis
I'm not sure about 2010 but 2007 is at least supported."Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties="Excel 12.0;IMEX=1;HDR=YES;"And if worse comes to worse save the file in a 2003 format which Jet can deal with.
Justin