Excel Process not closing in VB.net

后端 未结 8 1107
星月不相逢
星月不相逢 2020-12-03 09:00

I am creating an excel file using interop.excel and the process is not closing. This is the code i am trying to use.

 Private Sub converToExcel(fileLoc As S         


        
8条回答
  •  长情又很酷
    2020-12-03 09:40

    Try System.Runtime.InteropServices.Marshal.FinalReleaseComObject, that should help... also you should call xlWorkBook.Close() and xlapp.quit, if I recall correctly. First call them and then set them to nothing.

提交回复
热议问题