I have read all of the posts regarding margins...and followed exactly what was posted, but am still having a problem with setting the margins, specifically the bottom margin.
We are using 220.127.116.11 of the Aspose.Excel DLL.
We are looking for a 0.25" margin on the top, left, and right sides of the page, and a 0.75" margin on the bottom.
with this code:
pageSetup.TopMargin = 0.635D;
pageSetup.BottomMargin = 1.905D;
pageSetup.LeftMargin = 0.635D;
pageSetup.RightMargin = 0.635D;
it sets the top, left, and right to 0.635", and the bottom to 4.09470809755808E-06"
which is not what we want. For some reason, the 0.635D (in centimeters) does not convert to 0.25", but stays at 0.635" in the spreadsheet.
Ok...so I tried this code:
pageSetup.TopMargin = 0.25D;
pageSetup.BottomMargin = 0.75D;
pageSetup.LeftMargin = 0.25D;
pageSetup.RightMargin = 0.25D;
and now the top, left, and right margins are correctly set at 0.25" when I open the spreadsheet, but the bottom margin is still not correct.
1) what value should be passed to the properties for the margins (centimeters, inches, ...) and how?
2) is there a bug with the bottom margin property? No matter what I try, that property is not setting itself right. I believe, although I am not 100% sure, that this property was working fine in prior releases.