This code fails because you have used the String.Format syntax incorrectly. Which in return is causing the Command to not have a connection assigned to it. Change your code to this below:
excelcmd = new OleDbCommand(String.Format("SELECT * FROM [{0}]$", openFileDialog1.FileName), ConnectToExcel);