Editing an Excel file with Planmaker invalidates its access with python module openpyxl

Post Reply
mbb
Posts: 24
Joined: Thu Dec 07, 2017 11:53 am

Editing an Excel file with Planmaker invalidates its access with python module openpyxl

Post by mbb »

Hi!

I'm working on a small script in python, which, among other things, opens and manipulates Excel files. Upon testing the script, I noticed that if I edit a file in Planmaker, then I can't open it with openpyxl (I haven't tried other python modules).

The error displayed is the following:

Code: Select all

Traceback (most recent call last):
  File "/home/mochobb/projects/cmvfat/tests/cmvfat.py", line 82, in <module>
    wbEDOC=load_workbook(str(fEDOC[int(iEDOC)]), read_only=False, data_only=False)
  File "/usr/lib/python3.10/site-packages/openpyxl/reader/excel.py", line 346, in load_workbook
    reader.read()
  File "/usr/lib/python3.10/site-packages/openpyxl/reader/excel.py", line 299, in read
    apply_stylesheet(self.archive, self.wb)
  File "/usr/lib/python3.10/site-packages/openpyxl/styles/stylesheet.py", line 198, in apply_stylesheet
    stylesheet = Stylesheet.from_tree(node)
  File "/usr/lib/python3.10/site-packages/openpyxl/styles/stylesheet.py", line 103, in from_tree
    return super(Stylesheet, cls).from_tree(node)
  File "/usr/lib/python3.10/site-packages/openpyxl/descriptors/serialisable.py", line 83, in from_tree
    obj = desc.from_tree(el)
  File "/usr/lib/python3.10/site-packages/openpyxl/descriptors/sequence.py", line 94, in from_tree
    return [self.expected_type.from_tree(el) for el in node]
  File "/usr/lib/python3.10/site-packages/openpyxl/descriptors/sequence.py", line 94, in <listcomp>
    return [self.expected_type.from_tree(el) for el in node]
  File "/usr/lib/python3.10/site-packages/openpyxl/styles/fills.py", line 64, in from_tree
    return PatternFill._from_tree(child)
  File "/usr/lib/python3.10/site-packages/openpyxl/styles/fills.py", line 102, in _from_tree
    return cls(**attrib)
TypeError: PatternFill.__init__() got an unexpected keyword argument 'extLst'
I attached two excel files. It is the same file, but one of them (ending with '0') was edited with MS Excel and the other was edited with Planmaker.

The error posted above already contains the line of code where it fails on the 2nd line (I only try to open the file). The code works normally if the two files are edited with MS Excel, so the problem isn't there.

I am aware this can be a problem on openpyxl side, but I thought reporting this problem here and making the files available could lead the Softmaker team to find some minor flaw which needs to be corrected.

Thank you very much,
Attachments
EDOC_FATURA_18_04_2023_2.xlsx
(9.99 KiB) Downloaded 264 times
EDOC_FATURA_18_04_2023_0.xlsx
(12.82 KiB) Downloaded 316 times
SuperTech
SoftMaker Team
SoftMaker Team
Posts: 3102
Joined: Wed Mar 11, 2020 5:31 pm

Re: Editing an Excel file with Planmaker invalidates its access with python module openpyxl

Post by SuperTech »

Thanks for your post. I have forwarded the details to our developer team.
rim7bo6b
Posts: 1
Joined: Tue Jun 18, 2024 10:27 pm

Re: Editing an Excel file with Planmaker invalidates its access with python module openpyxl

Post by rim7bo6b »

SuperTech wrote: Thu Apr 27, 2023 12:57 pm Thanks for your post. I have forwarded the details to our developer team.
Any updates on this? According to the openpyxl team, the extLst attribute should not be there: https://foss.heptapod.net/openpyxl/open ... ssues/2199.

I am not sure how related this is, but the SoftMaker team seems to have (had?) a strong opinion on this one in 2019: https://forum.softmaker.com/viewtopic.php?t=18826. Maybe that was a too harsh, iff the standard really does not allow the attribute?
Last edited by rim7bo6b on Tue Jun 18, 2024 10:33 pm, edited 1 time in total.
SuperTech
SoftMaker Team
SoftMaker Team
Posts: 3102
Joined: Wed Mar 11, 2020 5:31 pm

Re: Editing an Excel file with Planmaker invalidates its access with python module openpyxl

Post by SuperTech »

Currently, there is no update on this.
Post Reply

Return to “BETA PlanMaker 2024 for Linux”