We've got a simple Xlsx reader (same code for Xls)
XlsxReader reader = new XlsxReader(fullyQualifiedPath);
reader.CurrentSheet = 0;
while (reader.ReadRecord())
{
.. do stuff here
}
which is appearing to throw an error when instantiating the XlsxReader. Looking at the stack trace, everything looks OK, except when it's trying to Dispose, its already Disposed.
System.ObjectDisposedException: Can not access a closed Stream.
at System.IO.Compression.DeflateStream.EnsureNotDisposed()
at System.IO.Compression.DeflateStream.Flush()
at MS.Internal.IO.Packaging.CompressStream.Flush()
at MS.Internal.IO.Packaging.CompressStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.Dispose(Boolean disposing)
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.Dispose()
at MS.Internal.IO.Zip.ZipIOBlockManager.Dispose(Boolean disposing)
at MS.Internal.IO.Zip.ZipIOBlockManager.Dispose()
at MS.Internal.IO.Zip.ZipArchive.Dispose(Boolean disposing)
At MS.Internal.IO.Zip.ZipArchive.Dispose()
At DataStreams.Xlsx.Zip.ZipArchive.Dispose()
at DataStreams.Xlsx.OOXml.Read.Workbook..ctor(Stream data)
at DataStreams.Xlsx.XlsxReader..ctor(String fileName)
We are using 5.20.0.0 (.Net4.5)
Thx
Stu