Discussions related to Visual Prolog
hicham
Active Member
Posts: 29
Joined: 3 Apr 2014 8:32

Excel office

Unread post 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
ok
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post 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
Regards Thomas Linder Puls
PDC
hicham
Active Member
Posts: 29
Joined: 3 Apr 2014 8:32

Unread post by hicham »

okey ... can u give me a example with ? i dont know how to add this
ok
hicham
Active Member
Posts: 29
Joined: 3 Apr 2014 8:32

Unread post 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
ok
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post 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.
Regards Thomas Linder Puls
PDC
Post Reply