Skip to Content
Menu
This question has been flagged
2 Replies
4672 Zobrazenia

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
Zrušiť
Autor Best Answer

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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
dec 18
2661
2
okt 18
7491
1
dec 16
6704
2
nov 16
5702
1
aug 16
3521