Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
4684 Visninger

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
Kassér
Forfatter Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
dec. 18
2671
2
okt. 18
7503
1
dec. 16
6717
2
nov. 16
5717
1
aug. 16
3536