WorkSheet Dispose method not working

Apr 16, 2014 at 8:36 AM
Edited Apr 16, 2014 at 8:37 AM
Hi,
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
thanks
Developer
Apr 17, 2014 at 4:14 PM
Hi,

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

/Mats