getTables provides a function to get all tables in a workbook.
()
| 204 | |
| 205 | // getTables provides a function to get all tables in a workbook. |
| 206 | func (f *File) getTables() (map[string][]Table, error) { |
| 207 | tables := map[string][]Table{} |
| 208 | for _, sheetName := range f.GetSheetList() { |
| 209 | tbls, err := f.GetTables(sheetName) |
| 210 | e := ErrSheetNotExist{sheetName} |
| 211 | if err != nil && err.Error() != newNotWorksheetError(sheetName).Error() && err.Error() != e.Error() { |
| 212 | return tables, err |
| 213 | } |
| 214 | tables[sheetName] = append(tables[sheetName], tbls...) |
| 215 | } |
| 216 | return tables, nil |
| 217 | } |
| 218 | |
| 219 | // countTables provides a function to get table files count storage in the |
| 220 | // folder xl/tables. |
no test coverage detected