Page 1 of 1

Excel office

Posted: 8 May 2014 13:40
by hicham
the problem i have is : when i click a buttom a excel file should open ...i dont know how to do it , i have only the editional version not the commercial.


thanks

Posted: 8 May 2014 15:14
by Thomas Linder Puls

Code: Select all

class shell_api     open core   predicates     shellOpen : (string File).     % @short Open #File using shell bindings.     % @detail See ShellExecute in MSDN.     % @end

Posted: 22 May 2014 11:26
by hicham
okey ... can u give me a example with ? i dont know how to add this

Posted: 22 May 2014 11:29
by hicham
i tried this :

Code: Select all

predicates       onPlanMaintenancePreventiveRedresseur : window::menuItemListener.   clauses       onPlanMaintenancePreventiveRedresseur(Source, _MenuTag):-       _=exe_native::shellExecute(nullHandle, "open","C:\\Users\\youness\\Documents\\Visual Prolog Projects\\database\\Exe\\testt.ods","", "", 1)
but the problem is that when i change .ods to .xltm . it doesn't work , can any body explain this to me

Posted: 22 May 2014 13:00
by Thomas Linder Puls
This will not help on the problem, but you should use the predicate I mentioned instead:

Code: Select all

clauses     onPlanMaintenancePreventiveRedresseur(Source, _MenuTag):-         shell_api::shellOpen(@"C:\Users\youness\Documents\Visual Prolog Projects\database\Exe\testt.ods")
shellOpen (which basically does the same as your code) does the same as a double click on the file in the explorer will do.

So I suggest you try to double click your xltm file, and see what then happens.