diff options
author | xuri <xuri.me@gmail.com> | 2021-07-05 00:03:56 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-07-05 00:03:56 +0800 |
commit | 544ef18a8cb9949fcb8833c6d2816783c90f3318 (patch) | |
tree | 88bb3eaa9d92522d3b5c4eeb052210c26bc4c99f /table.go | |
parent | 0e02329bedf6648259fd219642bb907bdb07fd21 (diff) |
- Support concurrency iterate rows and columns
- Rename exported field `File.XLSX` to `File.Pkg`
- Exported error message
Diffstat (limited to 'table.go')
-rw-r--r-- | table.go | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 } |