Welcome to Dream.In.Code
Become a Java Expert!

Join 150,381 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,185 people online right now. Registration is fast and FREE... Join Now!




hyperion dashboard code to stop screen updating

 
Reply to this topicStart new topic

hyperion dashboard code to stop screen updating

govworker
4 Feb, 2008 - 07:50 PM
Post #1

New D.I.C Head
*

Joined: 4 Feb, 2008
Posts: 4

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();

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 04:19PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month