'Openpyxl module returns 0 tables in the excel spreadsheet
I am trying to extract all tables from spreadsheet that contains multiple tables in each sheet.
But the following piece of code return 0 Tables in all worksheets.
Am i missing something here? Please suggest a workaround.
from openpyxl import load_workbook
wb = load_workbook(filename = '/Downloads/asd.xlsx')
for ws in wb.worksheets:
print(len(ws.tables)) # prints 0
Solution 1:[1]
In answer to your question 'Am i missing something here', the code should work if there are in fact tables in the workbook.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | moken |
