I encountered the same error message from Excel. In my case, the Excel was choking because the column names were not unique. I added some code to ensure every column name was unique and the error message went away.