I'm using in2csv from csvkit version 1.0.3, installed using pip with Python 3.7.
When using the tool for the most basic conversion task i.e.
in2csv filename.xlsx > test.csv
I was hit with error
iter_rows() got an unexpected keyword argument 'row_offset'
I understand that the error was reported by the underlying library openpyxl. How can this issue be resolved?
It seems that
row_offsetparameter inside iter_rows() has already been deprecated as of openpyxl version 2.6.0 last 6th Feb, 2019. I tried looking at the commit history and saw the following changes: https://bitbucket.org/openpyxl/openpyxl/diff/openpyxl/worksheet/worksheet.py?diff1=e4ec3bde4dcc&diff2=3294de3d5668f462baaa6b0a3c17e3b92b8e5c48&at=defaultTo fix this, you must no longer use the
row_offsetand adjust yourmin_rowandmax_rowaccordingly.e.g.
If you're processing only the 4th row of the worksheet:
If you're processing the rows starting from the 2nd row:
I actually like this change even though it broke my codes. I think using
min_rowandmax_rowmakes the code more readable and intuitive rather than using therow_offset.