Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
4325 Weergaven

how to run excel file or macro of excel  from  odoo v8 using a method (button)?

 in python  it work fine:

>>> import os

>>> os.system("start  'path\\file.xls'")

in odoo doesn't work:

def runMacro(self, cr, uid, ids, context=None):
if os.path.exists("bilan\\bilan.xls"):
os.system('start bilan\\bilan.xls')
else:
raise osv.except_osv(_('Error!'),
_('error msg'))

thanks in advance

Avatar
Annuleer

You have attached excel file in odoo and want to read excel data on button click am i right?

Auteur

I have an excel file that contains a macro, I want to run the execution of this file by clicking on a button!

execution mean you want to read excel data?

Auteur

no, but I think that odoo is limited in impoting and exporting data,

I want to launch a system action for windows from odoo, like run an excel file not only import and export...