Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
4596 Visualizações

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
Cancelar
Autor Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
dez. 18
2603
2
out. 18
7418
1
dez. 16
6634
2
nov. 16
5625
1
ago. 16
3443