Answer the question
In order to leave comments, you need to log in
How to write content of csv file only to specific column in OpenPyXL, Python?
I am writing a program to write CSV content to xlsx in Python, using the openpyxl module I
found a script on the Internet:
import csv
import openpyxl
wb = openpyxl.Workbook()
ws = wb.active
with open('res.csv') as f:
reader = csv .reader(f, delimiter=',')
for row in reader:
ws.append(row)
wb.save('file.xlsx')
however it only writes content to column A1, how to make the column selectable?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question