{"action":"opened","issue":{"url":"https://api.github.com/repos/ZoomerAnalytics/xlwings/issues/386","repository_url":"https://api.github.com/repos/ZoomerAnalytics/xlwings","labels_url":"https://api.github.com/repos/ZoomerAnalytics/xlwings/issues/386/labels{/name}","comments_url":"https://api.github.com/repos/ZoomerAnalytics/xlwings/issues/386/comments","events_url":"https://api.github.com/repos/ZoomerAnalytics/xlwings/issues/386/events","html_url":"https://github.com/ZoomerAnalytics/xlwings/issues/386","id":139504757,"number":386,"title":"closing a workbook does not update Workbook.current","user":{"login":"sdementen","id":1304950,"avatar_url":"https://avatars.githubusercontent.com/u/1304950?v=3","gravatar_id":"","url":"https://api.github.com/users/sdementen","html_url":"https://github.com/sdementen","followers_url":"https://api.github.com/users/sdementen/followers","following_url":"https://api.github.com/users/sdementen/following{/other_user}","gists_url":"https://api.github.com/users/sdementen/gists{/gist_id}","starred_url":"https://api.github.com/users/sdementen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdementen/subscriptions","organizations_url":"https://api.github.com/users/sdementen/orgs","repos_url":"https://api.github.com/users/sdementen/repos","events_url":"https://api.github.com/users/sdementen/events{/privacy}","received_events_url":"https://api.github.com/users/sdementen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-09T08:03:11Z","updated_at":"2016-03-09T08:03:11Z","closed_at":null,"body":"when closing a book, the last current workbook (or the active workbook) is not redefined leading to a cryptic error ==> improve exception or have some fallback for current\r\nExample\r\n```\r\n    wb = Workbook.active()\r\n    Range(\"A1\").value=\"ok\"\r\n    nwb = Workbook()\r\n    nwb.close()\r\n    Range(\"A1\").value=\"ko\"\r\n```\r\nraises the following exception\r\n`pywintypes.com_error: (-2147417848, 'The object invoked has disconnected from its clients.', None, None)`\r\n"}}