Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4908 Widoki

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?

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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]

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
gru 18
2905
2
paź 18
7712
1
gru 16
7066
2
lis 16
5956
1
sie 16
3790