{"action":"closed","issue":{"url":"https://api.github.com/repos/JanKallman/EPPlus/issues/148","repository_url":"https://api.github.com/repos/JanKallman/EPPlus","labels_url":"https://api.github.com/repos/JanKallman/EPPlus/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/JanKallman/EPPlus/issues/148/comments","events_url":"https://api.github.com/repos/JanKallman/EPPlus/issues/148/events","html_url":"https://github.com/JanKallman/EPPlus/issues/148","id":302014559,"number":148,"title":"Dispose error when using with Microsoft Dynamics NAV","user":{"login":"FROCHE38","id":37023141,"avatar_url":"https://avatars0.githubusercontent.com/u/37023141?v=4","gravatar_id":"","url":"https://api.github.com/users/FROCHE38","html_url":"https://github.com/FROCHE38","followers_url":"https://api.github.com/users/FROCHE38/followers","following_url":"https://api.github.com/users/FROCHE38/following{/other_user}","gists_url":"https://api.github.com/users/FROCHE38/gists{/gist_id}","starred_url":"https://api.github.com/users/FROCHE38/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FROCHE38/subscriptions","organizations_url":"https://api.github.com/users/FROCHE38/orgs","repos_url":"https://api.github.com/users/FROCHE38/repos","events_url":"https://api.github.com/users/FROCHE38/events{/privacy}","received_events_url":"https://api.github.com/users/FROCHE38/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-03T17:05:27Z","updated_at":"2018-03-04T09:13:00Z","closed_at":"2018-03-04T09:13:00Z","author_association":"NONE","body":"After many test, I have found the problem. \r\nTo solve it, can you please modify the function ExcelWorksheets.cs>Dispose and check the _worksheets variable before the foreach loop.\r\n\r\n        public void Dispose()\r\n        {\r\n            if (_worksheets != null)                             <<NEW LINE TO ADD\r\n            {\r\n                foreach (var sheet in this._worksheets.Values)\r\n                {\r\n                    ((IDisposable)sheet).Dispose();\r\n                }\r\n                _worksheets = null;\r\n                _pck = null;\r\n            }\r\n        }\r\n\r\n\r\nThanks"}}
{"actor":{"display_login":"FROCHE38"}}