Shatneriffic
MIS
Hello
We have an app that opens, refreshes and publishes a ton of Excel spreadsheets with pivot tables to a web folder. Most of the spreadsheets update fine. However, one just keeps being published with the data from the exact same date everyday. Below is the code. Section 1 is an example of one process that works fine. Section 2 is the one that never works. Can you help me understand why this would be? Both processes look similar. THANKS!!!
******************************************
****Section 1:****************************
******************************************
//save
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 60 & uP Lse.xls";
excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.SaveCopyAs("W:/CONADMIN/BobM/Clev 60 & uP Lse.xls");
excelWorkbook.Close(false, workbookPath, false);
//refresh all
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 60 & uP Lse.xls";
excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.RefreshAll();
excelWorkbook.Save();
excelWorkbook.Close(false, workbookPath, false);
//WEBSITE
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 60 & uP Lse.xls";
excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.RefreshAll();
excelWorkbook.SaveCopyAs("Q:/reports/coll_rpts/Aging_Delq/Daily/Clev 60 & uP Lse.xls");
excelWorkbook.Close(false, workbookPath, false);
******************************************
****Section 2:****************************
******************************************
//save
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 30-59 25K Lse.xls";
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.Application.DisplayAlerts = false;
excelWorkbook.SaveCopyAs("W:/CONADMIN/BobM/Clev 30-59 25K Lse.xls");
excelWorkbook.Close(false, workbookPath, false);
//refresh all
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 30-59 25K Lse.xls";
excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.RefreshAll();
excelWorkbook.Application.DisplayAlerts = false;
excelWorkbook.Save();
excelWorkbook.Close(false, workbookPath, false);
//WEBSITE
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 30-59 25K Lse.xls";
excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.Application.DisplayAlerts = false;
excelWorkbook.SaveCopyAs("Q:/reports/coll_rpts/Aging_Delq/Daily/Clev 30-59 25K Lse.xls");
excelWorkbook.Close(false, workbookPath, false);
We have an app that opens, refreshes and publishes a ton of Excel spreadsheets with pivot tables to a web folder. Most of the spreadsheets update fine. However, one just keeps being published with the data from the exact same date everyday. Below is the code. Section 1 is an example of one process that works fine. Section 2 is the one that never works. Can you help me understand why this would be? Both processes look similar. THANKS!!!
******************************************
****Section 1:****************************
******************************************
//save
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 60 & uP Lse.xls";
excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.SaveCopyAs("W:/CONADMIN/BobM/Clev 60 & uP Lse.xls");
excelWorkbook.Close(false, workbookPath, false);
//refresh all
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 60 & uP Lse.xls";
excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.RefreshAll();
excelWorkbook.Save();
excelWorkbook.Close(false, workbookPath, false);
//WEBSITE
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 60 & uP Lse.xls";
excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.RefreshAll();
excelWorkbook.SaveCopyAs("Q:/reports/coll_rpts/Aging_Delq/Daily/Clev 60 & uP Lse.xls");
excelWorkbook.Close(false, workbookPath, false);
******************************************
****Section 2:****************************
******************************************
//save
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 30-59 25K Lse.xls";
Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.Application.DisplayAlerts = false;
excelWorkbook.SaveCopyAs("W:/CONADMIN/BobM/Clev 30-59 25K Lse.xls");
excelWorkbook.Close(false, workbookPath, false);
//refresh all
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 30-59 25K Lse.xls";
excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.RefreshAll();
excelWorkbook.Application.DisplayAlerts = false;
excelWorkbook.Save();
excelWorkbook.Close(false, workbookPath, false);
//WEBSITE
workbookPath = "W:/CONS_CRED_ADJ/DAILY DELINQUENCY/Clev 30-59 25K Lse.xls";
excelWorkbook = excelApp.Workbooks.Open(workbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
true, false, 0, true);
excelWorkbook.Application.DisplayAlerts = false;
excelWorkbook.SaveCopyAs("Q:/reports/coll_rpts/Aging_Delq/Daily/Clev 30-59 25K Lse.xls");
excelWorkbook.Close(false, workbookPath, false);