RhSolutions-AddIn/src/PriceListTools/Target.cs
2022-01-27 17:34:03 +03:00

25 lines
672 B
C#

using Microsoft.Office.Interop.Excel;
using System;
namespace RehauSku.PriceListTools
{
internal class Target : PriceList
{
public Target(Workbook workbook)
{
Sheet = workbook.ActiveSheet;
Name = workbook.FullName;
amountCell = Sheet.Cells.Find(amountHeader);
skuCell = Sheet.Cells.Find(skuHeader);
groupCell = Sheet.Cells.Find(groupHeader);
if (amountCell == null || skuCell == null || groupCell == null)
{
throw new ArgumentException($"Шаблон { Name } не является прайс-листом");
}
}
}
}