Can't reopen a workbook I have previously made with openpyxl
Created originally on Bitbucket by twild (Tom Wild)
If I try to open a workbook that I previously made with openpyxl using: workbook = OpenExcelFile(filePath, fileName)
I get the following error:
#!python
File "E:/work/IlouraGit/wildutils\excel2util.py", line 59, in OpenExcelFile
workbook = openpyxl.load_workbook(filename=filePath + fileName)
File "build\bdist.win-amd64\egg\openpyxl\reader\excel.py", line 152, in load_workbook
File "build\bdist.win-amd64\egg\openpyxl\reader\excel.py", line 206, in _load_workbook
File "build\bdist.win-amd64\egg\openpyxl\reader\style.py", line 215, in read_style_table
File "build\bdist.win-amd64\egg\openpyxl\reader\style.py", line 44, in parse
File "build\bdist.win-amd64\egg\openpyxl\reader\style.py", line 197, in parse_cell_xfs
AttributeError: 'NoneType' object has no attribute 'copy'
If I manually open the workbook and then save it then I can open it with openpyxl so I suspect that I'm not saving it properly, I am saving using:
#!python
SaveExcelFile(filePath, fileName, workbook)
Any thoughts would be appreciated
Tom