Calculate Page Setup Scaling Factor
Contents
[
Hide
]
When you set Page Setup Scaling using Fit to n page(s) wide by m tall option, Microsoft Excel calculates the Page Setup Scaling Factor. You can calculate the same thing using SheetRender.getPageScale() property. This property returns a double value which can be converted to a percentage value. For example, if it returns 0.5079621076 then it means the scaling factor is 51%.
Calculate Page Setup Scaling Factor
The following sample code illustrates how to calculate page setup scaling factor using SheetRender.getPageScale() property.
Console Output
Here is the console output of the above sample code.
0.5079621076583862