An additional cause for this error. The code sample below returns the error when the datatable (dtTable) has a blank tablename:
' Open Excel workbook
objExcelApp = New Application
objExcelWorkbook = objExcelApp.Workbooks.Add()
objExcelSheet = objExcelWorkbook.ActiveSheet
objExcelSheet.Name = dtTable.TableName