Is it possible to extract information from an excel file (.xls) into c# on a computer without excel installed?
I've got the following code:
OleDbConnection objConn = new
OleDbConnection(CONNECTION_STRING.Replace("<FILENAME>", fileName));
try
{
objConnection.Open();
}
catch (Exception)
{}
It throws an IndexOutOfRangeException ("Cannot find table 0") when I try to open the OleDbConnection when run on a computer that does not have excel installed. The same code run on a computer with excel works just fine. I therefore very strongly suspect the lack of excel to be the culprit.
Is this the problem? If this is, how can I extract data from the file?