Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5538 Lượt xem

Hi Everybody

I want to write data from Odoo in existing Excel file. How can I copy an existing Excel file and work on it (put data from odoo) but the Excel file shoul maintain the formats of cells.


NB: this is an Odoo/Python question, if any one have an answer please share it !!


Best Regards

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

we developed a module with a similar requirement. The module loads an excel file that is stored on the server, writes information in some sheets and finally stores the excel file in the odoo database. The user can download the file through the web client.

To achieve this, we use the openpyxl module: \openpyxl. 

I'm not sure if all format properties of a cell are preserved, but at least the font, size, colour are not modified when you write in a cell.


I hope this few information can help you find a solution for your project.


Best regards

Yvan 

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Hi Everyone


I'm still not finding how to write in an existing Excel file (Maintain the existing cell formats) and let the user print it.

If Anyone can help, I will appreciate it. Thanks a lot !!

Thanks in advance

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 16
5037
0
thg 9 15
5383
0
thg 3 15
4812
1
thg 7 25
405
1
thg 6 25
1035