Build 5.0.0.10 of xlsgen makes a change in behavior when a worksheet is deleted.
Before this build, when a worksheet was deleted, its content would be internally erased, but the worksheet itself would still appear as part of the worksheet collection of the current workbook. And only when closing the workbook would the worksheet be actually not written back in the file, hence the worksheet deletion.
Beginning with this build, a worksheet deleted by a statement such as worksheet.Delete()
immediately disappear from the worksheet collection, making it more natural to program worksheets.