Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
7540 มุมมอง

Hi , i have created a xlsx file and need to open as downloadable when i click on button in python how to achieve this ?

อวตาร
ละทิ้ง

Do you have a solution for your problem ?

คำตอบที่ดีที่สุด

In python there is a package called cStringIO, which is used for buffering.write the xlsx file data to the buffer(encode using base64) variable and then write this value in the buffer variable to a binary field in openerp.

อวตาร
ละทิ้ง
ผู้เขียน

Thanks for your reply, but my requirement is to display the file and not to store in database how can i achieve this

from where you are creating the xls file?can you give some more details? is it related to openerp?

ผู้เขียน

i am fetching the information from view class and creating the xlsx file

คำตอบที่ดีที่สุด

Take a look at the module that exports the current view to XLS:

https://code.launchpad.net/~domsense/web-addons/7.0-web_export_view

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.พ. 23
1942
1
มี.ค. 15
5256
0
พ.ค. 23
66
2
ก.ย. 24
3533
1
ม.ค. 23
16999