#7 #2 tests added

This commit is contained in:
Andreas Schröpfer
2021-03-01 20:15:25 +01:00
parent 7dde4775dd
commit 7270660f2c
7 changed files with 36 additions and 4 deletions

View File

@@ -43,14 +43,20 @@ func XLSX(r io.Reader, conf *Conf) (*ecalc.Ecalc, error) {
for r := a.StartRow; r <= a.EndRow; r++ {
sf := ecalc.SupplyFraction{}
for _, c := range a.Cols {
axis := fmt.Sprintf("%s%d", c.Col, r)
cellValue, err := xFile.GetCellValue(
xFile.GetSheetName(a.Sheet),
fmt.Sprintf("%s%d", c.Col, r),
axis,
)
if err != nil {
errs = append(errs, err)
}
set.Field(&sf, c.Field, cellValue)
err = set.Field(&sf, c.Field, cellValue)
if err != nil {
errs = append(errs,
fmt.Errorf("XLSXL.SupplyFraction: Sheet %d, Cell %s: %w",
a.Sheet, axis, err))
}
}
eBalance.CompanyFacts.SupplyFractions =
append(