/// <summary> /// 设置工作表的大小 /// </summary> /// <param name="Size"></param> public void SetPaperSize(xlPaperSize Size) { //Range.PageSetup.PaperSize(纸张尺寸) object PageSetup = WorkSheet.GetType().InvokeMember("PageSetup", BindingFlags.GetProperty, null, WorkSheet, null); PageSetup.GetType().InvokeMember("PaperSize", BindingFlags.SetProperty, null, PageSetup, new object[] { Size }); }
//сярюмнбйю пюглепю кхярю public void SetPaperSize(xlPaperSize Size) { //Range.PageSetup.PaperSize - пюглеп кхярю object PageSetup = WorkSheet.GetType().InvokeMember("PageSetup", BindingFlags.GetProperty, null, WorkSheet, null); PageSetup.GetType().InvokeMember("PaperSize", BindingFlags.SetProperty, null, PageSetup, new object[] { Size }); }