Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
4518 Tampilan

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
Buang
Penulis Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Des 18
2561
2
Okt 18
7359
1
Des 16
6557
2
Nov 16
5531
1
Agu 16
3367