Could someone share examples how to call Prolog as a server from Excel as a client?


#1

Hi, I am looking for examples to use Excel for data collection and use Prolog for data analysis. It looks to me DDE can work.

Thank you for your helps in advance.


#2

Hi John,

I don’t have the code anymore (unfortunately), but many years ago I did actually do exactly that – have excel as a data entry tool with swi-prolog doing some analyses, and the connect work via DDE.

this was for a particular swi-prolog version and a windows version – perhaps windows xp.

So, i can only tell you that it worked.

Daniel


#3

Hi Daniel,
Thanks for response. With Google search, I can find examples about communication between Excel and SWI prolog, such as read or write Cells. Or resiger a DDE server with Prolog, and examples to call the DDE server inside SWI-prolog. All doesn’t meet my need – Excel VBA to call Prolog and run.

I am thinking to setup HTTP server with SWI-prolog, then let Excel to visit the server to trigger Prolog to do something. Have you ever done it?

Thanks,
John


#4

I’m interested in such links. Do report if you find interesting ways to connect the programs. In my current development I use Excel as a data source/sink via C#, and connect C# with SWI by HTTP, but in these cases Excel is a passive participant and there are no live triggers.


#5

Perhaps a way to go is write a real excel plugin in C# …

I think thats the route i took, rather than macro / vb code development …

Dan