Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
7558 Näkymät

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

Avatar
Hylkää

Do you have a solution for your problem ?

Paras vastaus

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.

Avatar
Hylkää
Tekijä

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?

Tekijä

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

Paras vastaus

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

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
helmik. 23
1974
1
maalisk. 15
5270
0
toukok. 23
66
2
syysk. 24
3570
1
tammik. 23
17043