How to set left and Right footer margin

Hi Team,

I have a requirement to set left and right margin of the footer in the excel sheet.
I am using Aspose cell for JDK1.4

I find below to set footer margin from top
PageSetup pageSetup = sheet.getPageSetup();
pageSetup.setFooterMargin();

also I can set pageSetup.setLeftMargin(), but its not applicable for footer section.
Attached here the screenshot.

Pls let me know how to set margin for footer from left and right.

Regards,
Uttam

Hi Uttam,


Thank you for contacting Aspose support.

Please note, you should be using the PageSetup.LeftMargin & RightMargin properties for your requirement for horizontal spacing of the footer, whereas the property PageSetup.FooterMargin will adjust the vertical spacing of the footer. As you have mentioned that the PageSetup.LeftMargin & RightMargin properties are not moving the footer according to the contents of the Worksheet then it could be a problem in your current version of the API as I have tested the scenario against the latest version (8.6.1.2) and it worked fine. Please give a try to the latest version to confirm this point.

Java

Workbook workbook = new Workbook(file);
workbook.getWorksheets().get(0).getPageSetup().setLeftMarginInch(2);
workbook.getWorksheets().get(0).getPageSetup().setRightMarginInch(3);
workbook.save(“C:/temp/book1.pdf”);