You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to obtain the list of DefinedNames today, and that works well. In Excel (M365), Name Manager also lists defined Tables as named ranges.
In excelize, there are functions to add tables (AddTable()), but not to retrieve existing tables. Some of the private functions, such as countTables(), appear to be able to access the proper information about tables.
Ideally, existing tables should either be returned in DefinedNames() or in a new function such as Tables().
Tables are a very common structure in many Excel files, and I happen to use them extensively because of their power in providing structured references for use in formula functions such as XLOOKUP.
If this ability is already present, then I apologize for having missed it.
Describe the results you expected:
File.Tables() would return a list of tables defined in the workbook similar to File.DefinedNames(). The returned structure should include at least the name or the table and the reference to be useful, and ideally all the data that could be used in AddTable().
Output of go version:
go version go1.19.5 Darwin/amd64
Excelize version or commit ID:
require github.com/xuri/excelize/v2 v2.7.0
Environment details (OS, Microsoft Excel™ version, physical, etc.):
MacOS 12.6.2, Excel M365 current as of today
The text was updated successfully, but these errors were encountered:
That would be great. I took a look and am not sure I can easily figure out the changes to add this feature, but it looks like the code already examines the tables refs in XML, so I guessing it is very close.
The new functions GetTables has been added. Now, we can get table name, range, style name, etc., please try to upgrade the master branch code. This feature will be released in the next version.
Description
It is possible to obtain the list of DefinedNames today, and that works well. In Excel (M365), Name Manager also lists defined Tables as named ranges.
In excelize, there are functions to add tables (AddTable()), but not to retrieve existing tables. Some of the private functions, such as countTables(), appear to be able to access the proper information about tables.
Ideally, existing tables should either be returned in DefinedNames() or in a new function such as Tables().
Tables are a very common structure in many Excel files, and I happen to use them extensively because of their power in providing structured references for use in formula functions such as XLOOKUP.
If this ability is already present, then I apologize for having missed it.
Describe the results you expected:
File.Tables() would return a list of tables defined in the workbook similar to File.DefinedNames(). The returned structure should include at least the name or the table and the reference to be useful, and ideally all the data that could be used in AddTable().
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
MacOS 12.6.2, Excel M365 current as of today
The text was updated successfully, but these errors were encountered: