Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();
excelApp.DisplayAlerts = false;
Workbook theWorkbook = excelApp.Workbooks._Open(XlsxPath, 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();
System.Threading.Thread.Sleep(Convert.ToInt32(60000));
theWorkbook.Save();
excelApp.Quit();
is working fine but the flowing is not working
Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();
excelApp.DisplayAlerts = false;
Workbook theWorkbook = excelApp.Workbooks._Open(XlsxPath, 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();
excelApp.Quit();
Why please help me i don't want to include
System.Threading.Thread.Sleep(Convert.ToInt32(60000));
because i don't know how much time it will take for refreshing
Please help me
Thanks
Sudheer.N