Hello everyone,
I just started C# today, and i have trouble reading an excel file.
Here's what i did :
OleDbConnection connection = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filePath + @";Extended Properties=""Excel 12.0;HDR=YES;""");
OleDbCommand command = new OleDbCommand("SELECT * FROM [Sheet$]", connection);
connection.Open();
OleDbDataReader reader = command.ExecuteReader();
And i have an exception saying it can't find "Sheet$" (i can't copy/paste the exception, because the message is in french, and i don't know yet how to have generic messages in english)
Could someone tell me what did i do wrong ?
I followed what they say in tutorials or like here http://stackoverflow.com/questions/15828/reading-excel-files-from-c
Thanks, really !