开发者

Setting Excel FitToPagesWide to "Automatic" in C# (VTSO)

开发者 https://www.devze.com 2023-02-05 06:44 出处:网络
When I record a开发者_开发百科 macro in excel to set the FitToPagesTall = 1 and leave FitToPagesWide as \"Automatic\" it sets FitToPagesWide to 0. However this errors when in c# (using VSTO).

When I record a开发者_开发百科 macro in excel to set the FitToPagesTall = 1 and leave FitToPagesWide as "Automatic" it sets FitToPagesWide to 0. However this errors when in c# (using VSTO).

sheet.PageSetup.FitToPagesWide=0;

Any ideas? Tried setting to NULL to no avail.


Found it.

Have to set to false.

sheet.PageSetup.FitToPagesWide = false;
0

精彩评论

暂无评论...
验证码 换一张
取 消