From bb6cee1fe08befe918c0e85fa9f4a52b554b741d Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Fri, 28 Jan 2022 12:37:02 +0300 Subject: [PATCH] Wrap new column header text --- src/PriceListTools/CombineTool.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PriceListTools/CombineTool.cs b/src/PriceListTools/CombineTool.cs index 6550179..a5864b7 100644 --- a/src/PriceListTools/CombineTool.cs +++ b/src/PriceListTools/CombineTool.cs @@ -18,7 +18,9 @@ namespace RehauSku.PriceListTools .EntireColumn .Insert(XlInsertShiftDirection.xlShiftToRight, XlInsertFormatOrigin.xlFormatFromRightOrBelow); - TargetFile.Sheet.Cells[TargetFile.amountCell.Row, TargetFile.amountCell.Column - 1].Value2 = $"{source.Name}"; + Range newColumnHeader = TargetFile.Sheet.Cells[TargetFile.amountCell.Row, TargetFile.amountCell.Column - 1]; + newColumnHeader.Value2 = $"{source.Name}"; + newColumnHeader.WrapText = true; FillColumn(source.PositionAmount, TargetFile.amountCell.Column - 1); FillColumn(source.PositionAmount, TargetFile.amountCell.Column);