Example #1
0
        /// <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 });
        }
Example #2
0
        //сярюмнбйю пюглепю кхярю
        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 });
        }