• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

POI and Excel formulas

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I can't be the only one with this dilemma so I thought I would post it in case others are struggling with the same requirements. Currently I am using POI to open and enter data into a MS Excel spreadsheet. This spreadsheet is being used in a web application in the background as a calculator. Reason being, there are way too many business rules that go into this spreadsheet to be able to realistically convert it into the application.

POI is a great tool and all works fine unless your data is being calculated -- the most important reason for me, and I suspect many others as well.

To read a cell that has been calculated from your entries, the spreadsheet needs to be somehow be opened up in Excel. In my testing I've found that using POI to enter values, stopping the app and opening and closing the spreadsheet in Excel, then reading the data via POI again works fine.

The problem is how to automate opening Excel to run the calcs programmatically. Do I use JNI to access a VB executable? This requires Excel on the server!!

I can't use VBScript in the browser as ActiveX controls are not allowed in our intranet.

There are some commercial products on the market that extend POI that support runtime calculations but only partially. Our business users could realistically enter a formula sometime in the future that isn't supported and breaks the app.

Anyway, I'm going the JNI route. It seems to be the only solution for us. Any thoughts on this would be very welcome. I can't imagine how many others have struggled with this as well.

Happy Holidays,
Richard
 
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should ask this question on the poi-user mailing list

http://jakarta.apache.org/site/mail2.html#poi
 
Richard Elsberry
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sean,

I had posted a similar question on the poi users site but didn't really get much insight. However, in the meantime I did find another open source solution called JACOB. It's a Java/COM bridge and has been working fine for my needs. It does much more, but all I need to do is open the .xls file and close it to perform the calculations.

Richard
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic