Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))

后端 未结 7 922
有刺的猬
有刺的猬 2020-11-27 21:46

I am trying to convert a .xls file to an .xlsx file on the server-side using Microsoft.Office.Interop.Excel.Workbook class as follows:

 workBook         


        
7条回答
  •  甜味超标
    2020-11-27 22:03

    Try to add Thread.Sleep Method, such as Thread.Sleep(2000) for 2 seconds after workBook.open and workBook.SaveAs two methods. If your Excel file has a lot of formats, try to extend few more seconds.

提交回复
热议问题