I have been working on a program to input some data into an excel file using Openpyxl with options of either loading an existing file or creating a new file. While creating a new file allows me to write the data to the excel file without any problems but loading from an existing file and trying to write new data to new rows raises a NotImplementedError with the line:
ws['A' + str(row)] = gene]
wb = load_workbook(filename=file_name+'.xlsx', use_iterators=True)
If you open a file in read-only mode, why do you expect to be able to edit it? The exception is raised for exactly this reason.
use_iterators when opening the file to avoid this.