好像不是吧,我查到这样的资料 You have to "use" the Win32::OLE::Variant module use Win32::OLE::Variant;and then use Variant(VT_BOOL, 0) as the "False" value: $PageSetup->{Zoom} = Variant(VT_BOOL, 0);The reason is that Zoom takes *either* a floating point zoom factor, *or* a boolean False value. Normally 0 works as False, but in this instance Excel interprets it as a zoom factor of 0, which of course doesn't make any sense. I would actually consider this a mis-feature of Excel. :-)但是在C#中应该如何写呢?
You have to "use" the Win32::OLE::Variant module use Win32::OLE::Variant;and then use Variant(VT_BOOL, 0) as the "False" value: $PageSetup->{Zoom} = Variant(VT_BOOL, 0);The reason is that Zoom takes *either* a floating point zoom factor, *or*
a boolean False value. Normally 0 works as False, but in this instance
Excel interprets it as a zoom factor of 0, which of course doesn't make
any sense. I would actually consider this a mis-feature of Excel. :-)但是在C#中应该如何写呢?