>>> import openpyxl>>> from openpyxl import load_workbook>>> wb2 = load_workbook('D:\Aegis_POC\Agies_GUI\e.xlsx')Traceback (most recent call last): File "<interactive input>", line 1, in <module> File "C:\Python27\lib\site-packages\openpyxl\reader\excel.py", line 154, in load_workbook _load_workbook(wb, archive, filename, read_only, keep_vba) File "C:\Python27\lib\site-packages\openpyxl\reader\excel.py", line 242, in _load_workbook keep_vba=keep_vba) File "C:\Python27\lib\site-packages\openpyxl\reader\worksheet.py", line 323, in read_worksheet fast_parse(ws, xml_source, shared_strings, style_table, color_index) File "C:\Python27\lib\site-packages\openpyxl\reader\worksheet.py", line 311, in fast_parse parser.parse() File "C:\Python27\lib\site-packages\openpyxl\reader\worksheet.py", line 92, in parse dispatcher[tag_name](element) File "C:\Python27\lib\site-packages\openpyxl\reader\worksheet.py", line 206, in parse_header_footer self.ws.header_footer.setHeader(oddHeader.text) File "C:\Python27\lib\site-packages\openpyxl\worksheet\header_footer.py", line 169, in setHeader matches = _split_string(item) File "C:\Python27\lib\site-packages\openpyxl\worksheet\header_footer.py", line 202, in _split_string return m.groupdict()AttributeError: 'NoneType' object has no attribute 'groupdict'
>>> wb2 = load_workbook('D:\sample\e.xlsx', use_iterators=True)>>> t = wb2.get_sheet_by_name(name="Malls")>>> t.cell(row=1, column=1,).value="1111111">>> wb2.save('D:\sample\e.xlsx')
Am .03.2015, 10:55 Uhr, schrieb Charlie Clark <charlie.clark@clark-consulting.eu>:
You can use the following code in worksheet/header_footer.py:
It turns out the problem was largely the multiline footer. This is now fixed, though the logos are removed. However, the fix didn't make it into 2.2 which was released this afternoon. You can either use a checkout of the 2.2 branch or pin your environment to the 2.1.5 release (this doesn't preserve the footer at all) and wait for the next 2.2 patch release.
Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
--
You received this message because you are subscribed to a topic in the Google Groups "openpyxl-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpyxl-users/4ZFUilkhFHU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpyxl-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.