Deleting a worksheet...


I noted that when I try delete a worksheet that i have created it gives me a "IndexOutOfRangeException" but if i create a worksheet into excel manually and not by ExcelPackage.Workbook.Worksheets.Add("Test"); for example I am able to do that...

Its strange and the exception that is generated is simple to understang, but it's not real. I have tried to delete by 3 options of delete method: Index, string and object. and before i consult it by quickwatch and i have 3 worksheets and the most important that i need to delete but the exception is generated.

Whats happenning? I need set one property before creating and later i am able to delete?

Heeeelp, please.