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
4644 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
2649
2
paź 18
7468
1
gru 16
6683
2
lis 16
5690
1
sie 16
3505