Neven

Neven

  • NA
  • 16
  • 0

Excel Refresh Question

Apr 9 2010 10:57 AM
Please help me, 
how to check if Excel Workbook has been refreshed after calling a method RefreshAll().

 Excel.Application EXL = new Excel.ApplicationClass();
 Excel.Workbook WRKBK = EXL.Workbooks.Open(Environment.CurrentDirectory + "/XYZ.xlsx", 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, false, false);
WRKBK.RefreshAll();
WRKBK.Save();
EXL.Quit();


This code suposed to refresh excel workbook and then save it. But the problem is that Save() method is called before RefreshAll() is finished. I don't know how to check if refresh is over :( 

Please help me....

Answers (1)