Zero-Index Cells Corrupting Workbooks

Issue #563 resolved
Griffin Skudder
created an issue

I've attached some code and test data that demonstrates the problem. The issue boils down to two things, first, assigning an instance of cell to a variable when row=0 and/or column=0 does not throw an exception to sys.stderr. Second, saving a workbook that has had a cell with row=0 or column=0 accessed still completes even though an exception is thrown. In cases where column=0, the entire newly saved workbook is corrupted and cannot be recovered by Excel. Where row=0 an error will be shown by Excel but data is able to be recovered.

Comments (3)

  1. Charlie Clark

    Thanks for the report. Regarding the second part of the report: it's impossible not to create an invalid file once saving because creating the archive file is the first part. Well, it might be possible to wrap this is some kind of try/except block but the code for saving a file is currently extensive.

    We will investigate adding a guard to cell creation (this used to be the case when converted immediately to A1 coordinates and will be again once we move to a matrix store) so that users are informed immediately though the use of 1-indexing is clearly documented. So, it's also a case of caveat utilor.

  2. Log in to comment