diff --git a/internal/dirtoexcel/dirtoexcel.go b/internal/dirtoexcel/dirtoexcel.go index 40f4143..a07fb21 100644 --- a/internal/dirtoexcel/dirtoexcel.go +++ b/internal/dirtoexcel/dirtoexcel.go @@ -76,7 +76,11 @@ func Create(out, dir string) error { return fmt.Errorf("strange numbers of matches") } - if err := f.SetCellStr("Sheet1", fmt.Sprintf("A%d", i+1), res[0][1]); err != nil { + company := res[0][1] + + log.Debug("extracted", slog.String("company", company)) + + if err := f.SetCellStr("Sheet1", fmt.Sprintf("A%d", i+1), company); err != nil { return fmt.Errorf("failed to set cell: %w", err) } @@ -85,7 +89,11 @@ func Create(out, dir string) error { return fmt.Errorf("failed to parse value: %w", err) } - if err := f.SetCellValue("Sheet1", fmt.Sprintf("B%d", i+1), math.Round(value*100)/100); err != nil { + rValue := math.Round(value*100) / 100 + + log.Debug("extracted", slog.Float64("value", rValue)) + + if err := f.SetCellValue("Sheet1", fmt.Sprintf("B%d", i+1), rValue); err != nil { return fmt.Errorf("failed to set cell: %w", err) }