Write data in excel sheet

hi i am trying to write data in excel sheet but it is throwing error message . i am able to read data from excel sheet but i am not able to write data . i have attached

  1. appium server log’s
  2. console out error message
  3. code for writing data in excel sheet

after runing i was getting error and excel sheet got corrupted

Please do need full help ASAP