summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RhSolutions.Api/Services/ClosedXMLParser.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/RhSolutions.Api/Services/ClosedXMLParser.cs b/RhSolutions.Api/Services/ClosedXMLParser.cs
index 2c614e0..81dccf5 100644
--- a/RhSolutions.Api/Services/ClosedXMLParser.cs
+++ b/RhSolutions.Api/Services/ClosedXMLParser.cs
@@ -31,9 +31,14 @@ namespace RhSolutions.Api.Services
{
var firstCellAddress = ws.Search("Программа", System.Globalization.CompareOptions.IgnoreCase)
.First()
+ .CellLeft()
.Address;
- var lastCellAddress = ws.LastCellUsed().Address;
+ var lastCellAddress = ws.Search("Цена брутто", System.Globalization.CompareOptions.IgnoreCase)
+ .First()
+ .WorksheetColumn()
+ .LastCellUsed()
+ .Address;
return ws.Range(firstCellAddress, lastCellAddress).AsTable();
}
@@ -89,16 +94,16 @@ namespace RhSolutions.Api.Services
productWarehouseCount = 0.0;
}
- string onWarehouseField = row.Field("Складская программа")
+ string onWarehouseField = row.Field(0)
.GetString();
bool IsOnWarehouse;
switch (onWarehouseField)
{
- case "x":
+ case "N":
IsOnWarehouse = true;
break;
- case "под заказ":
+ case "Z":
IsOnWarehouse = false;
break;
default: