Aug 18, 2012 at 8:26 PM
Edited Aug 18, 2012 at 8:28 PM
Hello! I am a happy, happy new user of ClosedXML. All I'm doing is passing datatables, and seeing the Excel results. No special formatting, no special handling, nada.
Everything works perfectly on the nineteen or so tables my app passes, but I'm having difficulty with just one and I cannot see what's different. I am executing "internal static memorystream WriteExcelOpenXML(DataTable ThisTable)".
On the statement "workbook.worksheets.Add(ThisTable);" I puke with the error message "Worksheet names cannot be empty".
I saw this before, when I passed a datatable with no rows, but that's not the case here. The only thing different about this table is that it comes from passing my table (derived via recordset) into a PivotTable routine that returns a new table.
But still, the new table has simple rows and columns.
I looked at some of the columns that were defined as Int32 and saw cell value (ToString) of String.Empty. Thought maybe that was it so I revised those values to DBNull. NO HELP. Then I changed them to zero. NO HELP.
Can anybody please suggest what I need to do, or to check with this table to get past this error? Production implementation deadline is looming!!
Thanks in advance.