Odoo Help


How shall I read out data from a binary Excel file by Python?

on 7/17/16, 10:15 AM 2,092 views

I upload an excel file on odoo by “fields.Binary” and assign it to “filedata”;

now I think it is an binary format, I want to read out its data from the “filedata”, How shall I?

Taher Giyori
On 7/18/16, 9:28 AM

use this code to convert and save it to a file

import base64

f = open("/path/to/file/spreadsheet.xls", "wb")

# f.read()


exactly, it runs very well;

Thanks for your help.

on 7/19/16, 4:51 AM

Another problem: shall I write the modified data back into a new Excel file?

on 7/20/16, 10:30 PM

Assuming you mean to modify your excel file (Binary data),

after modifying, you will need to reassign the excel file to your field, or you can do this through the UI itself.

Taher Giyori
on 7/23/16, 5:13 AM

ok, thank you

on 7/24/16, 9:22 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 7/17/16, 10:15 AM
Seen: 2092 times
Last updated: 7/19/16, 4:51 AM