跳至內容
選單
此問題已被標幟
2 回覆
4662 瀏覽次數

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?

頭像
捨棄
作者 最佳答案

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]

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
12月 18
2658
2
10月 18
7483
1
12月 16
6696
2
11月 16
5699
1
8月 16
3517