diff options
Diffstat (limited to 'pkg/datamaps')
-rw-r--r-- | pkg/datamaps/reader.go | 2 | ||||
-rw-r--r-- | pkg/datamaps/reader_test.go | 7 | ||||
-rw-r--r-- | pkg/datamaps/testdata/test_template.xlsm | bin | 0 -> 9193 bytes |
3 files changed, 6 insertions, 3 deletions
diff --git a/pkg/datamaps/reader.go b/pkg/datamaps/reader.go index 3f1e26d..d706d8f 100644 --- a/pkg/datamaps/reader.go +++ b/pkg/datamaps/reader.go @@ -250,7 +250,7 @@ func getTargetFiles(path string) ([]string, error) { return nil, fmt.Errorf("path must end in a %s character", string(filepath.Separator)) } - fullpath := strings.Join([]string{path, "*.xlsx"}, "") + fullpath := strings.Join([]string{path, "*.xls[xm]"}, "") output, err := filepath.Glob(fullpath) if err != nil { diff --git a/pkg/datamaps/reader_test.go b/pkg/datamaps/reader_test.go index abe5afc..32e7f67 100644 --- a/pkg/datamaps/reader_test.go +++ b/pkg/datamaps/reader_test.go @@ -231,9 +231,12 @@ func TestGetTargetFiles(t *testing.T) { }{ {"Get files in testdata", args{"./testdata/"}, - []string{"testdata/test_template.xlsx", + []string{ + "testdata/test_template.xlsm", + "testdata/test_template.xlsx", "testdata/test_template2.xlsx", - "testdata/test_template3.xlsx"}, + "testdata/test_template3.xlsx", + }, false, }, } diff --git a/pkg/datamaps/testdata/test_template.xlsm b/pkg/datamaps/testdata/test_template.xlsm Binary files differnew file mode 100644 index 0000000..77ac56f --- /dev/null +++ b/pkg/datamaps/testdata/test_template.xlsm |