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

WorkSheet Dispose method not working

Apr 16, 2014 at 9:36 AM
Edited Apr 16, 2014 at 9:37 AM
we are trying to run this code :
using Ws =pck.workbook.worksheets("MyWs")
' Here Some code
End Using 
but we have an exception: The object reference is not set to an instance of an object.
this message appears on the End Using.
if we use this syntax:
dim ws =pck.workbook.workSheets("MyWs")
' Here some code
the problem appears only when we add Ws.Dispose

NB: We use the EpPlus 4.0 Library
Apr 17, 2014 at 5:14 PM

Dont use the using statement on worksheet, use it on the ExcelPackage instead.