2 Replies Latest reply on Jan 15, 2015 9:18 AM by ewertonm RSS
    ewertonm Creator

    Consuming JAVA libs in ThingWorx

    I am trying to manipulate some MSOffice documents inside TW and found out that an easy way to do it is using Apache POI libs.

    My usecase is simple: get a datatable from TW and write it into a named table in Excel.

    As I am not able to call them from the Services Javascript, what would be the best way to do it?

    I thought maybe I´d have to write an extension for it. If so, is there any documentation or is everthing in the Wiki?]




      • Consuming JAVA libs in ThingWorx
        vladimirros Creator

        Hi Ewerton,

        In order to use any Java lib in ThingWorx, you need to create an Extension, in Eclipse.
        If you look in the Wiki, section 09. ThingWorx Extensibility has the documentation you need (description + sample Eclipse Java project).
        As a side note, creating an Extension for ThingWorx, most of the time, means just wrapping the existing functionality from your JARs.
        After some time spent familiarizing yourself with the Object Model of the Extensions (very similar with the TW one) you will see that creating an Extension is very easy, doable in 1-3 days.



        • Consuming JAVA libs in ThingWorx
          ewertonm Creator

          Thanks for the feedback. I was able to write a basic extension that reads a named range in Excel and writes value on it. Struggled a bit to understand the object model but It is really not that difficult