Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
C# Excel Doubt
Excel WorkBook has 2 worksheets in it. I want to set the VIEW Zoo (i.e Magnification ) of the 1st Excel Worksheet to 70% and the 2n Worksheet to 80% thru the code (C#). I have tried using "objExcelWorkbook.Windows[1].Zoom = 80 ;" , but thi will set the zoom percentage of only one worksheet. I also tried setting the zoom on each Worksheet as follows : objSheet1.PageSetup.Zoom = 70; objSheet2.PageSetup.Zoom = 80; But the above code will set the PageSetup Zoom (ie PrintPreview) bu not the View Zoom. Any Ideas, how to set the View - Zoom of both the Sheets -- rejij ----------------------------------------------------------------------- rejijo's Profile: http://www.msusenet.com/member.php?userid=138 View this thread: http://www.msusenet.com/t-187044058 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
C# Excel Doubt
ok , I got the solution : for(int intSheetCtr =1; intSheetCtr < objExcelWorkbook.Worksheets.Count ;intSheetCtr++) { objExcelSheet (Excel.Worksheet)objExcelWorkbook.Worksheets.get_I tem(intSheetCtr); objExcelSheet.Activate(); if(intSheetCtr == 1) objExcelWorkbook.Windows[1].Zoom = 70; else if(intSheetCtr == 2) objExcelWorkbook.Windows[1].Zoom = 80; -- rejij ----------------------------------------------------------------------- rejijo's Profile: http://www.msusenet.com/member.php?userid=138 View this thread: http://www.msusenet.com/t-187044058 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macros Doubt | Excel Discussion (Misc queries) | |||
doubt | Excel Worksheet Functions | |||
Excel Doubt | Excel Discussion (Misc queries) | |||
I have a doubt! | Excel Discussion (Misc queries) | |||
some doubt | Excel Worksheet Functions |