473,378 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Print in excel : zoom to one page

19
Hi,
I'm trying to print an excel page using C#. I need to resize it to one page wide and one page tall. I've written the following code but it doesn't work (print the printarea only):
Expand|Select|Wrap|Line Numbers
  1. xlWorkSheet.PageSetup.Orientation = Microsoft.Office.Interop.Excel.XlPageOrientation.xlLandscape;
  2. xlWorkSheet.PageSetup.PrintArea = "A1:G" + NbrLines.ToString();
  3. xlWorkSheet.PageSetup.FitToPagesTall = 1;
  4. xlWorkSheet.PageSetup.FitToPagesWide = 1;
  5. xlWorkSheet.PrintOut (1, 1, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
  6.  
Could you please advise ?
Thanks
Nov 17 '10 #1

✓ answered by siilexx

I've found the missing parameter:

xlWorkSheet.PageSetup.Zoom = false;

1 9760
siilexx
19
I've found the missing parameter:

xlWorkSheet.PageSetup.Zoom = false;
Nov 17 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Steve | last post by:
Hi; I'm making an HTML screen that I would like to print on a single page: http://www.geocities.com/beforewisdom/Tech/Archive/ebnfNotation.html Doing a print preview with Mozilla 1.6 on...
21
by: Steel | last post by:
Hi at all, I have a very long html page with many photo. Therefore the best to print this page is to print the some page as PDF. Therefore I maked a PDF file like my page to print best. I'ld want...
0
by: magic man | last post by:
I have written an application in VB.Net using server side controls. I realize that I need client side controls to print anything at the clients computer. I have a web page that consists of a 1...
1
by: Paolo matador | last post by:
Hi All, i have a little problem with my web application. I need to print a web page, shrinked on a thermal printer that not supporting A4 format. The printer is this:...
5
by: Ben | last post by:
Hi All, I have a form which requires input, has conditional server side validations and print functionality. There is a print button which does client side validation & then custom validation, if...
0
by: th12345 | last post by:
Hi All, I want to create custom excel sheet page in my web application like how Google spreadsheet was created. I do not want load data into Microsoft excel sheet. Please give some idea...
0
coolv
by: coolv | last post by:
Hello everyone, I have problem with getting a print of page in my application(ASP>NET,C#). I have reciept page in my application.in this page a data which i want to print comes from...
3
by: mygroup | last post by:
Hello Folks, I have an asp.net application which requires to fill a form. Once the form is completed, it should print the final page on server side (not the client side). I tried to use...
1
oranoos3000
by: oranoos3000 | last post by:
hi excuse me i want to put a picture on the webpage that by click on this picture a print of current page is got,this page is dynamic,and different for various user how can I do ?(with php or...
2
by: dhivyavasya | last post by:
I have to print a web page in landscape mode automatically when print is given. i dont want to go to settings and change the mode manually each time. help is needed
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.