We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Margin problem while printing excel created using Aspose.cells v4.5.0.0

We are creating a Excel file with the desired Format. But the margins are nto set properly as required. Attached the sample excel file "Required_Excel.xls" and the actual file "Actual_Excel.xls" generated using Aspose.cells.

In actual file empty space is present at top and bottom. Also the rows are squeezed in Print preview even though the row hieght is set as required.

Can you please provide or suggest some solution for this problem.



Please try the attached latest version and let us know if you still find any issue.

Thank you.

Can't we do anything else rather than using the new version. We wanted to use the same verssion and solve the problem. Here's the code we are using to set the margins.

workSheet.Zoom = 75;

workSheet.PageSetup.Orientation = Aspose.Cells.PageOrientationType.Landscape;

workSheet.PageSetup.FitToPagesTall = 1;

workSheet.PageSetup.FitToPagesWide = 1;

workSheet.PageSetup.PrintGridlines = false;

workSheet.PageSetup.PaperSize = Aspose.Cells.PaperSizeType.PaperLetter;

workSheet.PageSetup.BottomMarginInch = 0.25;

workSheet.PageSetup.LeftMarginInch = 0.25;

workSheet.PageSetup.RightMarginInch = 0.25;

workSheet.PageSetup.TopMarginInch = 0.25;

workSheet.PageSetup.HeaderMarginInch = 0.25;

workSheet.PageSetup.FooterMarginInch = 0.25;

workSheet.PageSetup.CenterHorizontally = true;

workSheet.PageSetup.CenterVertically = true;


"Can’t we do anything else rather than using the new version. We wanted to use the same verssion and solve the problem."

Well, I am afraid, you have to use the latest version to check whether it works fine or not. If it does not work, we are bound to it and can fix the issue. For your information, we cannot amend any code segment or fix any issue in the older versions as we cannot go against our internal policies. So, consequently you need to use the latest version that I attached in my previous post.

Thanks for your understanding!