We have a project which creates an Excel file and save it in Network shared drive and after that it opens up that file, application works fine but I get a weird messages. Consider the following piece of codes
using Excel = Microsoft.Office.Interop.Excel;
....
xlsAppClass = new Excel.Application();
Process excelPID = GetExcelProcessId(xlsAppClass);
//
// All codes generate and save the excel file...
// and return the filePath which is located in Network Shared drive.
//
xlsWorkBook.Close();
xlsAppClass.Quit();
Marshal.ReleaseComObject(xlsSheets);
Marshal.ReleaseComObject(xlsWorksheet);
Marshal.ReleaseComObject(xlsWorkBook);
Marshal.ReleaseComObject(xlsAppClass);
if (excelPID != null) excelPID.Kill();
// When program reaches this line of code excel file created, saved and Excel process killed
// I checked the TaskManager, nothing's there.
Then I opens up the generated file via the following code
System.Diagnostics.Process.Start(filePath);
at this moment System opens up the file but I get the following message as well which I couldnt figure it out WHY "Microsoft Office Communicator 2007 is already running"
实际上,我重新启动了PC,问题已解决!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.