Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tuddman/clj-dde

connect to a DDE (dynamic data exchange) server/client ... in Clojure!
https://github.com/tuddman/clj-dde

clojure dde excel

Last synced: 3 months ago
JSON representation

connect to a DDE (dynamic data exchange) server/client ... in Clojure!

Awesome Lists containing this project

README

        

# clj-dde

A Clojure library (really a wrapper around the Java DDE library provided by pretty_tools) to interoperate with DDE (dynamic data exchange) sources.

## Rationale

1. Sometimes you need to connect to a DDE source, and
2. would rather do it in Clojure > some other language

## Setup

Make sure you have [Leiningen](http://leiningen.org/) installed.

Your `project.clj` should include something like the following:

```clj
(defproject foo "0.1.0"
...
:dependencies [[org.clojure/clojure "1.5.1"]
[clj-dde "0.2.0"]]
...)
```

## Usage

Work in Progress.

When you need to connect with a DDE data source...

```clojure
(def excel-conv (dde/convesation)) ;; to setup a connection.
(dde/connect excel-conv "excel" "sheet1") ;; to connect to a datasource (excel)
(dde/request excel-conv "R1C1") ;; to 'poll' the data contained in cell R1C1
```

The major difference between version 0.1.x and 0.2.x is that all functions
that previously returned `nil` now returns the conversation object, thus
making the functions chain-able:

```clojure
(-> (dde/conversation)
(dde/connect "excel" "sheet1")
(dde/request "R1C1"))
```

check out the dde-example folder for further examples and usage.

## Issues

If you get the message "java.lang.UnsatisfiedLinkError: no JavaDDEx64 (or JavaDDE) in java.library.path" you need to add the javaDDEx64.dll (or javaDDE.dll) file (it's in /resources) to your classpath directory:

`(System/getProperty "java.library.path")` to find out where this file needs to go.

## License

Copyright © 2013 tuddman

Distributed under the Eclipse Public License; the same as Clojure.

The various included Java files (pretty_tools library) are licensed under their respective licenses.