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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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?
use this code to convert and save it to a file
import base64
f = open("/path/to/file/spreadsheet.xls", "wb")
f.write(self.filedata.decode('base64'))
# f.read()
f.close()
exactly, it runs very well;
Thanks for your help.
Another problem: shall I write the modified data back into a new Excel file?
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.
ok, thank you
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
7
cze 20
|
19880 | ||
|
1
lis 22
|
2077 | ||
|
0
sty 22
|
2294 | ||
ODOO 12 how can we generate Excel report
Rozwiązane
|
|
7
sty 24
|
14607 | |
|
0
lip 19
|
2034 |