EPPLUS打印参数

 

OfficeOpenXml.ExcelPackage expackage = new OfficeOpenXml.ExcelPackage();
OfficeOpenXml.ExcelWorkbook workbook = expackage.Workbook;
OfficeOpenXml.ExcelWorksheet worksheetfabric = workbook.Worksheets.Add("需求单");

 

//打印方向:横向
worksheetfabric.PrinterSettings.Orientation=eOrientation.Landscape;
//集中在一页里打印
worksheetfabric.PrinterSettings.FitToPage = true;
//使用A4纸
worksheetfabric.PrinterSettings.PaperSize = ePaperSize.A4;

你可能感兴趣的:(EPPLUS打印参数)