diff --git a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanImportService.cs b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanImportService.cs index 2b4467af..dc5d87b3 100644 --- a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanImportService.cs +++ b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanImportService.cs @@ -343,14 +343,15 @@ public class ProcessMapPlanImportService : IProcessMapPlanImportService private static T GetCellValue(IXLRow row, int columnNumber) { - var cell = row.Cell(columnNumber); - - if (cell.Value is T cellValue) + try { - return cellValue; + var cell = row.Cell(columnNumber); + return (T)Convert.ChangeType(cell.Value, typeof(T)); + } + catch + { + throw new FileFormatException( + $"Лист {row.Worksheet.Name}. Ячейка: ({row.RowNumber()},{columnNumber}) содержит некорректное значение"); } - - throw new FileFormatException( - $"Лист {row.Worksheet.Name}. Ячейка:{columnNumber},{row.RowNumber()} содержит некорректное значение"); } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanTemplate.xlsx b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanTemplate.xlsx index 48d2708e..be2c62e9 100644 Binary files a/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanTemplate.xlsx and b/AsbCloudInfrastructure/Services/ProcessMap/ProcessMapPlanTemplate.xlsx differ