Reputation: 9
I am using Python 3.7 and using OpenPyxl to read the sheet names from a large excel workbook (29MB) with 10 tabs.
import openpyxl
from openpyxl import load_workbook
wb = load_workbook(filename='h:\\Master_Portfoliio.xlsx')
print(wb.sheetnames)
The code above works for smaller files but when I use the same code for this file, the code just hangs. I would like to read the sheet names and then remove a tab and then copy a tab from another excel workbook into this workbook.
Upvotes: 0
Views: 199
Reputation: 3907
Have you tried the read_only = True
flag?
wb = load_workbook(filename='h:\\Master_Portfoliio.xlsx', read_only = True)
Upvotes: 0