Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
4682 Visualizzazioni

I have a binary field that holds my excel file and I need to read the data from it. I need to get the data as rows. How can I achieve this?

Can anyone help?

Avatar
Abbandona
Autore Risposta migliore

I got the answer.

Use xlrd to read the file as given below.


from xlrd import open_workbook

import base64

wb = open_workbook(file_contents = base64.decodestring(obj.file))

sheet = wb.sheets()[0]

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
dic 18
2670
2
ott 18
7503
1
dic 16
6716
2
nov 16
5714
1
ago 16
3535