- Home
- Forum
- ASP.NET MVC
- Print scaling option "Fit all columns on one page"
Print scaling option "Fit all columns on one page"
Hi,
I am unable to find the a way to replicate Excel sizing option to fill all columns on one page. Is this functionality available in XlsIO?
Is there a workaround?
Thank you
Filippo
SIGN IN To post a reply.
3 Replies
AV
Abirami Varadharajan
Syncfusion Team
March 8, 2018 06:51 AM UTC
Hi Filippo,
Thank you for contacting Syncfusion support.
We request you to set FitToPagesTall property of PageSetup as 0 to enable scaling option as “Fit All Columns on One Page”. Please find the below code to achieve the same.
Code Example:
|
//To set scaling as "Fit All Columns on One Page"
worksheet.PageSetup.FitToPagesTall = 0; |
Please refer below API to know more about PageSetup Properties
Kindly try and let us know that your requirement is fulfilled.
Regards,
Abirami.
************************************************
Regards,
Abirami.
FB
Filippo Borselli
March 8, 2018 11:07 AM UTC
Dear Abirami,
thank you for your reply, your suggestion works and now I can see in the print preview that all the columns fit in one page. My issue now is that I am trying to set an horizontal page break but the page break does not seems to be set when I view the document in print preview or in the page breaks view. This is the code I am using:
sheet.PageSetup.PrintArea = rangePrintArea.AddressLocal;
sheet.PageSetup.Orientation = ExcelPageOrientation.Portrait;
sheet.PageSetup.FitToPagesTall = 0;
var cellPageBreakRange = sheet[89, 1, 89, 1];
sheet.HPageBreaks.Add(cellPageBreakRange);
Thank you in advance for your help.
Kind Regards
Filippo
AV
Abirami Varadharajan
Syncfusion Team
March 9, 2018 10:29 AM UTC
Hi Filippo,
Thank you for updating us.
We are unable to reproduce the issue. The page breaks and scaling options are properly set with the shared code snippet. Kindly refer to the below sample which we have tried at our end.
Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/XlsIO_Sample-77053174.zip
Please let us know if the sample working fine at your end. If not, kindly modify the sample to reproduce the issue and share us to validate and provide a prompt solution at the earliest.
Regards,
Abirami.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
FB Filippo Borselli
- Mar 7, 2018 02:12 PM UTC
- Mar 9, 2018 10:29 AM UTC