Is it possible to extract information from an excel file (.xls) in C # on a computer without using excel ?
I have 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") exception when I try to open OleDbConnection when it starts on a computer that does not have excel installed. The same code that runs on an excel computer works fine. Therefore, I very much doubt the lack of superiority.
This is problem? If so, how can I extract data from a file?
AnnaR source
share