Hi,
I can't reproduce the scenario since I don't know thecontent of the EXCEL file and the schema of the statlogs.xyz table. The following are some general guidanceof trouble shooting your problem.
1. Check if you can run the insert SQL commend alone in the SQL Server Management Studio by doing this: set a break point at command.ExecuteNonQuery and run your program in the debug mode. When the program pauses at the break point, copy the value of the command.CommandText object and paste the text string in the SQL Server and execute this command seperately.
a. If this command executes successfully, itmeans that the syntax of this command is correct.The data in the Excel file are compatible with the schema of your database. The insertion doesn't violates any database constraints.
b. If this command fails, check that line of code.
2. Show us the detail information of the exception thrown by your application.
Regards,
Jacob