Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
4594 Vistas

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
Descartar
Autor Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
dic 18
2601
2
oct 18
7416
1
dic 16
6632
2
nov 16
5622
1
ago 16
3442