This project has moved and is read-only. For the latest updates, please go here.


Corrupt file if you create a workbook with no sheets.


XLWorkbook wb = new XLWorkbook();
wb.SaveAs(@"out.xlsx") It may be a breaking change, but I would consider having a default sheet in the workbook, or throwing an exception if you try to save a workbook with no sheets.
Closed Jul 30, 2014 at 3:06 AM by MDeLeon
I went with throwing an error. Adding a worksheet and getting a ws object is integral to making Excel files that I don't think there's much to gain by adding a worksheet automatically. I even find it cumbersome in a lot of cases where you don't want the default "Sheet1". Then there's the locale issue with other languages.