Calculate Page Setup Scaling Factor with Golang via C++
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 value using SheetRender.GetPageScale() property. This property returns a double value which can be converted to a percentage value. For example, if it returns 0.5, then it means that the scaling factor is 50%.
The following sample code illustrates how to calculate page setup scaling factor using SheetRender.GetPageScale() property.