cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco and POI

lordzoster
Champ in-the-making
Champ in-the-making
Hallo
could anybody link me to any example on how to use Alfresco with Apache POI?
How to reference POI etc.
Thanks in advance
4 REPLIES 4

mitpatoliya
Star Collaborator
Star Collaborator
What is your exact requirement?
If you simple add POI related jars in alfresco lib folder and inject your java classes in any of alfresco flow based on requirement(Action,Wizard,Dialog etc..) you should be good to go.

Hallo Mits, thank you for replying: you're actually giving me a path.
My requirement is to implement a couple of actions to be performed automatically:
1. find&replace in a docx
2. union/merge a set of docx documents into a single docx
I have been told that POI is already integrated within Alfresco, but I have some fog on my path:
1. how to implement an action (I'm searching right now, got some good starting points from ecmarchitect and some books)
2. how to use a 3rd party library (POI) within a custom action (still grey)

1)To use POI first you create stand along java classes which help you do that operations out of alfresco.That will be a simple java project no connection with alfresco.

2)Convert above classes in services (spring beans)
3)Then you can create custom action in alfresco.
4)Inject those services into the backend controller of alfresco actions.
5)You can now use the services to operate on current node as they are already injected.

Hope this gives you good direction.

mrogers
Star Contributor
Star Contributor
Yes POI is already a third party dependency for alfresco.    Alfresco currently uses it for for metadata extraction and some file comparison where office updates some metadata fields within excel and powerpoint documents upon opening a document but before making any edits.      And Tikka which is used for metadata extraction also uses POI.

There are also some metadata injector add on projects that I presume are based upon POI.    Its a few years since I last looked at those though.