HI all..i have this excel file created during export data from sql server. When i try to import this error occured "external data is not in the correct format' something like that. After i did some research the extended properties need to be change to HTML Import from Excel 8.0. Then the connection is ok. I want to try to import the data from 'Sheet_1' to table in server but another error come up. The Microsoft Jet database engine could not find the object 'Sheet_1$'. Make sure the object exists and that you spell its name and the path name correctly. In my excel there is a sheet named Sheet_1.
How to solve this problem? Thanks in advance :)
Code:
OleDbConnection connection = new OleDbConnection(excelConnectionString);
connection.Open();
OleDbCommand command = new OleDbCommand("SELECT * FROM [Sheet_1$]", connection);
OleDbDataReader dr = command.ExecuteReader(); <--error here
Comment