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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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 |
Well, I have faced the same issue
https://www.odoo.com/forum/help-1/question/how-to-import-xls-data-into-binary-field-in-odoo-10-using-a-two-dimensional-list-112749