Comments are broken in write_only mode
Created originally on Bitbucket by markcho (Mark Cho)
Comments are broken on Workbook(write_only=True)
To reproduce:
#!python
wb = Workbook(write_only=True)
ws = wb.create_sheet()
cell = WriteOnlyCell(ws, 'Test 1')
cell.comment = Comment(text='Hello World', author='openpyxl')
headers = [cell]
ws.append(headers)
wb.save('test.xlsx')
This will save text.xlsx file but when I tried to open the file in Microsoft Excel, I get the following error (see attached image).
Log file from Excel:
#!python
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>Repair Result to test 09449.xml</logFileName><summary>Errors were detected in file 'Macintosh HD:Users:...:test.xlsx'</summary><removedParts summary="Following is a list of removed parts:"><removedPart>Removed Part: Drawing shape.</removedPart></removedParts></recoveryLog>
Attachments: Screen_Shot_2016-04-02_at_4.56.37_PM