Hi;
how to create button and method to import Excel file?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi;
how to create button and method to import Excel file?
Xml
<button name="import_xls" string="Import" type="object" />
Py
import base64
import xlrd
xls_file = fields.Binary('File')
def import_xls(self):
wb = xlrd.open_workbook(file_contents=base64.decodestring(self.xls_file))
for sheet in wb.sheets():
for row in range(sheet.nrows):
for col in range(sheet.ncols):
print (sheet.cell(row,col).value)
If helpful you , upvote this.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Sep 23
|
411 | ||
|
1
Jul 18
|
3543 | ||
|
0
Mar 15
|
3331 | ||
|
0
Nov 24
|
2611 | ||
Import Sales Orders Status
Solved
|
|
2
Nov 24
|
124 |