Stacie
Stacie

Reputation: 306

JXLS - add formula for blank cells, formula just disappears

I created a report with JXLS and an excel template. I have a bunch of cells/columns pulling data from my database, then I have a few columns that are blank, and then I have some formulas/conditionals in a few columns in my report as well. The issue I am having is that one of the formulas, needs to run/ multiply two blank columns (someone will download the report and input the numbers manually in those blank columns), and when I run the generate the report through my Java app, the column with the formula comes up as =0. Anyways to get the formula to stick, so the people manually entering the numbers in the blank columns do not have to add/input the formula themselves? enter image description here

Upvotes: 0

Views: 993

Answers (1)

Leonid Vysochyn
Leonid Vysochyn

Reputation: 1264

You should get Jxls to process AC and AD cells by putting a dummy JEXL expression in there.

The simplest way is to put ${null} into AC and AD cells in your template.

Upvotes: 1

Related Questions