On 10 Aug 2020, at 13:13,
ottomi...@gmail.com wrote:
> Hi Charlie,
> Many thanks for your answer, but when I try this I get an attribute
> Error: '*str'
> object has no attribute 'ref'*
>
> Complete script is:
>
> from openpyxl import load_workbook
> from openpyxl.worksheet.table import Table
>
> wb = load_workbook(filename='file.xlsx')
> ws = wb['sheet']
>
> for table in ws._tables:
> print(table.ref)
>
> Do you have any additional advise?
You're using a newer version with a more sophisticated API:
https://openpyxl.readthedocs.io/en/latest/worksheet_tables.html