summaryrefslogtreecommitdiff
path: root/table.go
diff options
context:
space:
mode:
Diffstat (limited to 'table.go')
-rw-r--r--table.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/table.go b/table.go
index 12ef41a..620cf20 100644
--- a/table.go
+++ b/table.go
@@ -105,11 +105,12 @@ func (f *File) AddTable(sheet, hcell, vcell, format string) error {
// folder xl/tables.
func (f *File) countTables() int {
count := 0
- for k := range f.XLSX {
- if strings.Contains(k, "xl/tables/table") {
+ f.Pkg.Range(func(k, v interface{}) bool {
+ if strings.Contains(k.(string), "xl/tables/table") {
count++
}
- }
+ return true
+ })
return count
}