Page Breaks are affected after setting FitToPagesTall and FitToPagesWide Properties

Hi,

Page breaks are not recognized after setting FitToPagesTall and FitToPagesWide Properties.

I am attaching 2 excel sheets, w/o page breaks.

Please let me know a solution on this.

Thanks !

Rohan

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and use the latest version:
Aspose.Cells
for .NET v7.2.0.4

and let us know your feedback.

It is a normal behavior regarding the FitToPagesTall and FitToPagesWide properties. They will affect the page breaks surely.

Please see the code below. I have also attached the output xlsx file.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\AnalyticalReportByGroup.xlsx”;


Workbook workbook = new Workbook(filePath);


Worksheet worksheet = workbook.Worksheets[0];


worksheet.PageSetup.FitToPagesTall = 1;

worksheet.PageSetup.FitToPagesWide = 1;


workbook.Save(filePath + “.out.xlsx”);


But in Managing Page Breaks you had specified :

Important to know

When you set FitToPages properties (that is FitToPagesTall & FitToPagesWide) in Page Setup Settings, Page Break Settings will not be affected.

Check out this link :

http://www.aspose.com/docs/display/cellsnet/Managing+Page+Breaks

Please let me know.

Hi,

Thanks for your mentioning the article.

We will look into your issue further and if article needs correction we will rectify it.

Hi,


After further investigation, we come to know that it is MS Excel’s behavior for the FitToPagesTall and FitToPagesWide properties. They will affect the page breaks. Shakeel Faiz is right. I have modified the “Important to Know” section on the page accordingly now:
http://www.aspose.com/docs/display/cellsnet/Managing+Page+Breaks
http://www.aspose.com/docs/display/cellsjava/Managing+Page+Breaks


Thank you.