Closed amm3 closed 7 years ago
Thanks. I'll get my Mac and reproduce the issue to make sure I understand the problem. Then I'll commit that change. I appreciate the feedback.
Mark
On Jan 14, 2017, at 9:42 AM, Adam Maddock notifications@github.com wrote:
@MarkBaggett, this is a great tool! I do most of my analysis in MacOs or Linux, so my preference was to use your raw python script. Unfortunately, I'm getting the following openpyxl (using version 2.4.1) error:
Traceback (most recent call last): File "./srum_dump.py", line 327, in
cell_style = template_sheet.cell(row = 4, column = eachcolumn).style AttributeError: 'ReadOnlyCell' object has no attribute 'style' It appears (in this version anyway) that the ReadOnlyCell class has different properties than the standard Cell class. Simply changing your call to openpyxl.load_workbook (line 268) to open the template read-write fixed the issue for me. Not ideal, but provides for a quick fix. (Also, FYI opening read-write appears to be a fairly safe operation if you don't call wb.save().)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I can confirm the issue reported by @amm3, as well as the suggested fix.
@MarkBaggett, this is a great tool! I do most of my analysis in MacOs or Linux, so my preference was to use your raw python script. Unfortunately, I'm getting the following
openpyxl
(using version 2.4.1) error:It appears (in this version anyway) that the
ReadOnlyCell
class has different properties than the standardCell
class. Simply changing your call toopenpyxl.load_workbook
(line 268) to open the template read-write fixed the issue for me. Not ideal, but provides for a quick fix.(Also, FYI opening read-write appears to be a fairly safe operation if you don't call
wb.save()
.)