In programming, I suppose the question should not be
Can I do it?
Instead it should be:
Is there an existing tool that someone else made that I can use to do it?'
If none exist, you can always make one! But in this case, it seams XLL4J may work for you.