1
Answer

Excel Refresh Question

Ask a question
Neven

Neven

14y
3.4k
1
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)