my command is something like this:
string command = "SELECT * FROM [SheetName1$]; SELECT * FROM [SheetName2$]; ...."
When I do
DataSet set = new DataSet();
using(OleDbDataAdapter adapter = new OleDbDataAdapter(command, connection))
{
adapter.Fill(ds)
}
I end up with an empty DataSet (more specifically I end up with an exception that says Characters found after end of SQL statement). However, if I use only one SELECT query this works fine.
Excel cannot execute more than in one statement. Try making this in two commands.