V
V
Vyacheslav Grachunov2018-09-17 21:17:50
Python
Vyacheslav Grachunov, 2018-09-17 21:17:50

How to make a cell numeric using openpyxl?

I do it like this:

ws.cell(row=rowlist[int(data['orgid'])], column=4+4*int(data['orgid'])).number_format = '0.00'
d = ws.cell(row=rowlist[int(data['orgid'])], column=4+4*int(data['orgid']), value=data['price'])

As a result, the cell is marked as numeric, and inside "The number is saved as text" with a warning
And how to write a fractional number there? Like 2.25? Do not change the dot to a comma - in English. versions with a dot. And he writes to me in a cell with a dot and that's it, this is not a number anymore

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Grachunov, 2018-09-17
@Qwentor

found a solution and that's it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question