From dfe4ef7b5bb5d920c8a01311a63cbdc472601589 Mon Sep 17 00:00:00 2001 From: Serghei Cebotari Date: Mon, 27 May 2024 23:44:59 +0300 Subject: [PATCH] Fix merged column header data format --- RhSolutions.AddIn/Services/ExcelWriterBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/RhSolutions.AddIn/Services/ExcelWriterBase.cs b/RhSolutions.AddIn/Services/ExcelWriterBase.cs index 3ec5348..e6fa80e 100644 --- a/RhSolutions.AddIn/Services/ExcelWriterBase.cs +++ b/RhSolutions.AddIn/Services/ExcelWriterBase.cs @@ -70,6 +70,7 @@ namespace RhSolutions.Services .Insert(XlInsertShiftDirection.xlShiftToRight, XlInsertFormatOrigin.xlFormatFromRightOrBelow); Range newColumnHeader = _worksheet.Cells[_amountCell.Row, _amountCell.Column - 1]; + newColumnHeader.NumberFormat = "@"; newColumnHeader.Value2 = $"{product.Item1}"; newColumnHeader.WrapText = true;