P
P
pvgdrk2015-03-31 20:13:11
Django
pvgdrk, 2015-03-31 20:13:11

How to insert cyrillic xsl into mysql via django?

openpyxl is great. This is a python library that reads an xslx file and allows it to be accessed as an object. But there is a problem with Cyrillic. I need to transfer data from xslx file to database. Some cells contain Cyrillic.
worksheet.cell(row = n, column = m).value gives the value of the cell, but in what encoding? How to get Cyrillic data for a database?
openpyxl.readthedocs.org/en/latest/index.html#

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valery Ryaboshapko, 2015-03-31
@pvgdrk

If I'm not mistaken, XLSX stores data in civil UTF-8. Checking is easy - print the value of the cell.
Upd. Moreover, XLSX is a compressed set of XML files, each of which carries an encoding mark. And apparently, it is UTF-8, although no one bothers to check it with pens every time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question