Modify an existing Excel file using Openpyxl in Python
I am basically trying to copy some specific columns from a CSV file and paste those in an existing excel file[*.xlsx] using python. Say for example, you have a CSV file like this : col_1 col_2 col_3 col_4 1 2 3 4 5 6 7 8 9 10 11 12 So, i wanted to copy the both col_3 and col_4 and paste those in col_8 and col_9 in an existing excel file [which is a .XLSX format]. I have tried this in various way to solve, but could not find out the exact way. i tried something like this : with open( read_x_csv, 'rb') as f: reader = csv.reader(f) for row in reader: list1 = row[13] queue1.append(list1) list2 =