A
A
AlexCruel2020-07-23 13:51:21
Python
AlexCruel, 2020-07-23 13:51:21

How to tell an Excel cell to write a specific value to it from Python?

I connect
import csv

I iterate over the array

with open(path, 'w', newline='') as file:
        writer = csv.writer(file, delimiter=';')
        writer.writerow(['Название', 'Цена', 'Ссылка'])
        for item in items:
            writer.writerow([item['title'], item['price'], item['link_product']])


With the help of the "csv" library, is it possible to independently specify in which cell I want to write a certain value? I understand, there is a line from A1 to C1 for one "object". But I would like to indicate the price for D10, for example.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-07-23
@AlexCruel

CSV is a little different - a data exchange format.
They would take openpyxl and write in xlsx - there are sheets, cells, formulas, and charts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question