Hi, I am attempting for the first time to use the hyperion dashboard to save various pivot tables as excel files on my c drive. I will then use vb to manipulate those files. The code below works, however it requires me to click after each "Do you want to save changes to book 1 etc". I would like to eliminate that so that it is a one click process, ie click and the files are all saved to the drive and no further action. I have been trying application.screenupdating = false and multiple variations without success. Any assistance is appreciated.
Many thanks
Govworker.
CODE
//Open Excel
var objExcel = new JOOLEObject("Excel.Application");
//make visible
objExcel.Visible = true;
objExcel.Workbooks.Add;
//***copy&pasting****
//Select Excel worksheet (number in bracket)
objExcel.Sheets.Item(1).Select;
//Select destination cell for Excel paste
objExcel.Range("A1").Select;
//Select pivot to copy
ActiveDocument.Sections["SITE NOS FOR SITE AVES"].Copy();
//Paste into Excel
objExcel.ActiveSheet.Paste;
//Autofit selection
objExcel.Selection.Columns.Autofit;
var docname="C:\\BRIO QUERIES\\2008\\CRAIG\\SITE NOS FOR SITE AVES.xls"
objExcel.ActiveWorkbook.SaveCopyAs (docname);
objExcel.ActiveWorkbook.close;
objExcel.Quit();
//second one
//Open Excel
var objExcel = new JOOLEObject("Excel.Application");
//make visible
objExcel.Visible = true;
objExcel.Workbooks.Add;
//***copy&pasting****
//Select Excel worksheet (number in bracket)
objExcel.Sheets.Item(1).Select;
//Select destination cell for Excel paste
objExcel.Range("A3").Select;
//Select pivot to copy
ActiveDocument.Sections["BRIO 1 LMR Clm Nos"].Copy();
//Paste into Excel
objExcel.ActiveSheet.Paste;
//Autofit selection
objExcel.Selection.Columns.Autofit;
var docname="C:\\BRIO QUERIES\\2008\\CRAIG\\BRIO 1 LMR Clm Nos.xls"
objExcel.ActiveWorkbook.SaveCopyAs (docname);
objExcel.ActiveWorkbook.Close;
objExcel.Quit();