{"action":"opened","issue":{"url":"https://api.github.com/repos/silverhack/voyeur/issues/1","labels_url":"https://api.github.com/repos/silverhack/voyeur/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/silverhack/voyeur/issues/1/comments","events_url":"https://api.github.com/repos/silverhack/voyeur/issues/1/events","html_url":"https://github.com/silverhack/voyeur/issues/1","id":122765964,"number":1,"title":"Excel - Invalid Index","user":{"login":"chrisATautomatemystuff","id":16337636,"avatar_url":"https://avatars.githubusercontent.com/u/16337636?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisATautomatemystuff","html_url":"https://github.com/chrisATautomatemystuff","followers_url":"https://api.github.com/users/chrisATautomatemystuff/followers","following_url":"https://api.github.com/users/chrisATautomatemystuff/following{/other_user}","gists_url":"https://api.github.com/users/chrisATautomatemystuff/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisATautomatemystuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisATautomatemystuff/subscriptions","organizations_url":"https://api.github.com/users/chrisATautomatemystuff/orgs","repos_url":"https://api.github.com/users/chrisATautomatemystuff/repos","events_url":"https://api.github.com/users/chrisATautomatemystuff/events{/privacy}","received_events_url":"https://api.github.com/users/chrisATautomatemystuff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-17T16:08:05Z","updated_at":"2015-12-17T16:08:05Z","closed_at":null,"body":"silverhack,\r\n\r\nI was trying to run this script today and export to excel. I was met with:\r\n\r\n\"Exception getting \"Item\": \"Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))\"\r\n\r\nI've been reading about the error online and see some solutions talking about $var.workbook.add() vs. $var.worksheet.add(), but I'm unsure where it's failing.\r\n\r\nI took a stab at it and commented out lines 33-36 and the scripts appears to have run successfully and produced a pretty excel file for me. It looks like those lines were attempting to delete the extra two worksheets that usually get created with a new Excel file. I don't know if it changed in Excel 2013 or if the environment I'm in has anything in place to limit the number of worksheets in a newly created workbook.\r\n\r\nI don't know if this is something you'd want to add an if-statement to in order to determine the Office version before attempting to delete the excess sheets.\r\n\r\nThanks for the tool though. I'm looking forward to really reading through the script to learn more about how you're pulling this information.\r\n\r\n-Chris"}}