Excel complains my spreadsheet is badly formed. How do I correct this?

If you want to understand exactly what is been written into each of the component XML files by the ExcelPackage assembly, then simply add the following line of code:

xlPackage.DebugMode = true;

This will cause the assembly to output the raw XML files in the same location as the output file. You will see a sub-folder called 'xl' and another callled 'docProps'.

Last edited Jan 3, 2007 at 4:48 PM by JohnTunnicliffe, version 1


rclugston Aug 26, 2009 at 9:20 PM 
So this is normal then and should be ignored? If not, are there any common causes?