By reading the last answer to the question: How to keep style format unchanged after writing data using OpenPyXL package in Python?
I see there is an XML file which contains metadata from Excel, including external links to other excelworkbooks. Thanks for such a good explanation.
After using load_workbook
, when I get the cell value of a cell containing a formula with a reference to other workbook, that referred workbook file name is replaced by a sort of index ([2] / [3] in the example which follows):
=H8+E5+G7+'s1'!$E$5+[2]Sheet1!$D$1+[3]Sheet1!$D$5
I need to obtain that formula with the real workbookname (all the referred excel workbooks are in the same folder as the one I am handling), something like this:
=H8+E5+G7+'s1'!$E$5+'s2.xlsm'Sheet1!$D$1+'s1.xlsm'Sheet1!$D$5
I have seen the option keep links
, but I don't manage to get those links to be part of the formula of the cell.
Is there a way to keep the real cell value with references to other workbooks when reading the cell in the origin workbook?
Thanks so much in advance.