I use this code to open a save and close excel file:
Application excelFile = new Application();
Workbook theWorkbook = excelFile.Workbooks._Open(Environment.CurrentDirectory + "/WebGate", 0, false, 5, System.Reflection.Missing.Value, System.Reflection.Missing.Value, false, System.Reflection.Missing.Value, System.Reflection.Missing.Value, true, false, System.Reflection.Missing.Value, false);
Sheets sheets = (Sheets)theWorkbook.Worksheets;
theWorkbook.RefreshAll();
theWorkbook.Save();
excelFile.Quit();
the problem is that there is a conflict between update and save commands because the file is saved and the update is running in the background (I think) Can anyone help me with this? I need to know how I can find out when the update process is running or some other indication that will help me decide when I should save the file without affecting the update process
eran
source
share