This project is read-only.

Closing package and releasing lock on file

Mar 4, 2010 at 4:13 PM

I am using the following syntax to open the package:

using (var package = SpreadsheetDocumentWrapper.Open(fileName))


However, the file is still locked following the code block.  I added and explicit package.Dispose() since it says it flushes, saves, closes, and releases resources but it doesn't appear to do so. 

I am immediately trying to open the document back up using the raw SDK but I cannot since the file is locked.  Am I missing something here?

Mar 4, 2010 at 8:25 PM

Sorry - this seems to be a problem that crept in during a recent code enhancement (that was designed to support streamed input / output).

I will work on a fix and post it here within the next 24 hours. In the meantime, if you wan't temporarily patch the source yourself, I suggest downloading the file SpreadsheetDocumentWrapper.cs from changeset 45951 (or prior) and use it in place of the current version.

However, this is a relatively simple fix, so I will release an update very quickly.

Mar 5, 2010 at 7:17 AM


I have uploaded a bug fix release. Hopefully it resolves your reported problem without introducing any new ones.

Please can you test it and report back on any new issues? Sorry for the inconvenience and thanks.

Mar 8, 2010 at 10:22 PM

I downloaded the latest and tested it with successful results.  Thanks Tim.