Planmaker 2024, Linux, debian 12. I created a vanilla spreadsheet and saved it to .xlsx. I copied it to a system that doesn't have Planmaker. When I try to read/edit it with openpyxl library in Python, it gets an error. "TypeError: PatternFill.__init__() got an unexpected keyword argument 'extLst'".
If I run it through Libreoffice Calc, it offers to modify it for 2007-365. I can then manipulate it with Python.
Is there a way to make Planmaker save in a compatible format?
Planmaker 2024 and openpyxl
Re: Planmaker 2024 and openpyxl
Thank you for reporting this problem. I have forwarded the details.
Please share that problematic file which you created with PlanMaker and giving error so that we can check it at our end.
If your file is private, please send it to forum[at]softmaker.com with the link of this post.
Please share that problematic file which you created with PlanMaker and giving error so that we can check it at our end.
If your file is private, please send it to forum[at]softmaker.com with the link of this post.
Re: Planmaker 2024 and openpyxl
Not very complex.
from openpyxl import load_workbook
workbook = load_workbook(filename="test4py2.xlsx")
TypeError: PatternFill.__init__() got an unexpected keyword argument 'extLst'
from openpyxl import load_workbook
workbook = load_workbook(filename="test4py2.xlsx")
TypeError: PatternFill.__init__() got an unexpected keyword argument 'extLst'
- Attachments
-
- test4py2.xlsx
- (5.79 KiB) Downloaded 272 times
Re: Planmaker 2024 and openpyxl
Thank you for sharing the file. This problem is in openpyxl libraries, as it's unable to handle the keywords from the file. Ideally, it should skip the unknown keywords. So, we can't do anything here.
Re: Planmaker 2024 and openpyxl
What keywords, may I ask?
Re: Planmaker 2024 and openpyxl
No answer? Figures. Odd that the same spreadsheet opened and saved with Libreoffice is OK.
Still would like to know which keywords I need to change.
Still would like to know which keywords I need to change.
Re: Planmaker 2024 and openpyxl
There are no keywords you can change, but the keywords from file format which openpyxl should ignore.
Re: Planmaker 2024 and openpyxl
The sample file also opens in Excel 2019, so there's nothing wrong with PlanMaker's implementation of the .xlsx file format.
-
- Posts: 16
- Joined: Sat Sep 13, 2008 1:08 pm
Re: Planmaker 2024 and openpyxl
I believe this is a minor problem with openpyxl rather than with any version of planmaker. I use openpyxl a lot and whenever I upgrade that package I have to edit the source file [somehere on your system]/ openpyxl/styles/fills.py. In the class PatternFill, find the def __init__ and add this:
, extLst=None
as the final argument, just after end_color=None. It is the absence of a default value for the parameter extLst that causes the error. I do wish that the developers of openpyxl would fix that!
, extLst=None
as the final argument, just after end_color=None. It is the absence of a default value for the parameter extLst that causes the error. I do wish that the developers of openpyxl would fix that!