N
Nyuno
Hello,
I am trying to get data from an Excel file using OleDbConnection in C#.NET
I have a function that returns a DataSet filled with data from the .xls
file. Problem is, it works only if I have opened that file in Excel manualy
before I run my function.
If the file isn't opened, when trying "oleDbDataAdapter.Fill ( dataSet )"
I'm receiving OleDbException: "External table is not in the expected format."
I have tried to open the file using Excel 11.0 reference before running that
function, but it didn't change anything. Seems like it's working only if the
file is opened not in Read-Only mode, but the program is supposed to be
working on several machines, possibly at the same time - cannot avoid
situation, that the file is used by someone else.
I know it is a common problem, and I also know there is no answer for that
question so far. Does anyone managed to resolve such issue? Is there any
other way to get data from .xls file without opening the Excel itself?
I am trying to get data from an Excel file using OleDbConnection in C#.NET
I have a function that returns a DataSet filled with data from the .xls
file. Problem is, it works only if I have opened that file in Excel manualy
before I run my function.
If the file isn't opened, when trying "oleDbDataAdapter.Fill ( dataSet )"
I'm receiving OleDbException: "External table is not in the expected format."
I have tried to open the file using Excel 11.0 reference before running that
function, but it didn't change anything. Seems like it's working only if the
file is opened not in Read-Only mode, but the program is supposed to be
working on several machines, possibly at the same time - cannot avoid
situation, that the file is used by someone else.
I know it is a common problem, and I also know there is no answer for that
question so far. Does anyone managed to resolve such issue? Is there any
other way to get data from .xls file without opening the Excel itself?