ASP.NET Control Excel, completely ending process

xiaoxiao2021-03-05  22

Excel.Application ThisApp = new Excel.ApplicationClass (); Excel.Workbooks ThisWbs = ThisApp.Workbooks; Excel.Workbook ThisWb = ThisWbs.Open ( "G: /demo.xls", Missing.Value, Missing.Value, Missing.Value Missing.Value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value; thiswb.saveas "G: /HelloExcel.xml", Excel.XlFileFormat.xlXMLSpreadsheet, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Excel.XlSaveAsAccessMode.xlNoChange, Missing.Value, Missing.Value, Missing.Value, Missing .Value, missing.value;

//Excel.XlFileFormat.xlXMLSpreadsheet control type System.Runtime.InteropServices.Marshal.ReleaseComObject file is stored (ThisWb); ThisWb = null; ThisWbs.Close (); System.Runtime.InteropServices.Marshal.ReleaseComObject (ThisWbs); ThisWbs = NULL; System.Runtime.InteropServices.Marshal.releaseComobject (thisapp); Thisapp = null; gc.collect ();

转载请注明原文地址:https://www.9cbs.com/read-37053.html

New Post(0)