From b21f1c8d99087449fb7f0f8c21605d7c8e9e5848 Mon Sep 17 00:00:00 2001 From: liyh Date: Sun, 12 May 2024 11:07:16 +0800 Subject: [PATCH] 11111 --- .../WeldingReport/WeldDailyExport.aspx.cs | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/HJGL/FineUIPro.Web/WeldingProcess/WeldingReport/WeldDailyExport.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/WeldingReport/WeldDailyExport.aspx.cs index 7e8748a..00ff56c 100644 --- a/HJGL/FineUIPro.Web/WeldingProcess/WeldingReport/WeldDailyExport.aspx.cs +++ b/HJGL/FineUIPro.Web/WeldingProcess/WeldingReport/WeldDailyExport.aspx.cs @@ -294,13 +294,13 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport ws.GetRow(rowIndex + 1).Height = 15 * 20; ws.GetRow(rowIndex + 2).Height = 30 * 20; - ws.SetColumnWidth(0, 4 * 256); - ws.SetColumnWidth(1, (int)(22.67 * 256)); + ws.SetColumnWidth(0, 5 * 256); + ws.SetColumnWidth(1, (int)(21.67 * 256)); ws.SetColumnWidth(2, (int)(9.78 * 256)); ws.SetColumnWidth(3, (int)(5.33 * 256)); ws.SetColumnWidth(4, (int)(7.67 * 256)); ws.SetColumnWidth(5, (int)(8.33 * 256)); - ws.SetColumnWidth(6, (int)(4.42 * 256)); + ws.SetColumnWidth(6, (int)(7 * 256)); ws.SetColumnWidth(7, (int)(10.82 * 256)); ws.SetColumnWidth(8, (int)(8.33 * 256)); ws.SetColumnWidth(9, (int)(8.40 * 256)); @@ -313,10 +313,10 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport ws.SetColumnWidth(16, (int)(4.00 * 256)); ws.SetColumnWidth(17, (int)(4.00 * 256)); ws.SetColumnWidth(18, (int)(9.00 * 256)); - ws.SetColumnWidth(19, (int)(9.33 * 256)); + ws.SetColumnWidth(19, (int)(7 * 256)); #endregion - const int pageSize = 67; + const int pageSize = 65; DataTable dt = GetDataTable(); var style3 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 9, false, false, "sans-serif"); @@ -391,17 +391,20 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport - ws.FitToPage = false; + ws.FitToPage = true; + ws.PrintSetup.FitWidth = 1; + ws.PrintSetup.FitHeight = short.MaxValue; + ws.SetMargin(MarginType.LeftMargin, (double)1.2 / 3); - ws.SetMargin(MarginType.RightMargin, (double)1.2 / 3); + ws.SetMargin(MarginType.RightMargin, (double)0.5 / 3); ws.SetMargin(MarginType.TopMargin, (double)1.8 / 3); ws.SetMargin(MarginType.BottomMargin, (double)2.9 / 3); ws.PrintSetup.Landscape = true; - ws.PrintSetup.Scale = 70; + //ws.PrintSetup.Scale = 70; ws.ForceFormulaRecalculation = true; - ws.PrintSetup.FitWidth = 1; - ws.PrintSetup.FitHeight = 0; + //ws.PrintSetup.FitWidth = 1; + //ws.PrintSetup.FitHeight = 0; ws.PrintSetup.PaperSize = (int)PaperSize.A4_Small; ws.RepeatingRows = new NPOI.SS.Util.CellRangeAddress(0,2, 0, 19);