cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Consuming JAVA libs in ThingWorx

emoreira
14-Alexandrite

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?]


Thanks

Ewerton

 



2 REPLIES 2

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.

BR,
Vladimir



emoreira
14-Alexandrite
(To:emoreira)

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

Ewerton

Announcements


Top Tags