How can I create a structured reference inside jett template?
JETT - Java Excel Template Translator
Status: Beta
Brought to you by:
rgettman
Hi I'm trying to use a structured reference with no success inside my template (https://support.office.com/en-us/article/Using-structured-references-with-Excel-tables-f5ed2452-2337-4f71-bed3-c8ae6d2b276e)
I tried both <jt:formula text="[ColumnName0]"/>
and <jt:null text="=[ColumnName0]"/>
but no one of the two worked...
The first one (<jt:formula text="<span>[ColumnName0]</span>"/>) gives me:
Exception in thread "Thread-5" org.apache.poi.ss.formula.FormulaParseException: Parse error near char 0 '[' in specified formula '[YTD MS]'. Expected number, string, or defined name at org.apache.poi.ss.formula.FormulaParser.expected(FormulaParser.java:214) at org.apache.poi.ss.formula.FormulaParser.parseAsName(FormulaParser.java:586) at org.apache.poi.ss.formula.FormulaParser.parseNonRange(FormulaParser.java:556) at org.apache.poi.ss.formula.FormulaParser.parseRangeable(FormulaParser.java:442) at org.apache.poi.ss.formula.FormulaParser.parseRangeExpression(FormulaParser.java:263) at org.apache.poi.ss.formula.FormulaParser.parseSimpleFactor(FormulaParser.java:1179) at org.apache.poi.ss.formula.FormulaParser.percentFactor(FormulaParser.java:1139) at org.apache.poi.ss.formula.FormulaParser.powerFactor(FormulaParser.java:1126) at org.apache.poi.ss.formula.FormulaParser.Term(FormulaParser.java:1486) at org.apache.poi.ss.formula.FormulaParser.additiveExpression(FormulaParser.java:1606) at org.apache.poi.ss.formula.FormulaParser.concatExpression(FormulaParser.java:1590) at org.apache.poi.ss.formula.FormulaParser.comparisonExpression(FormulaParser.java:1547) at org.apache.poi.ss.formula.FormulaParser.intersectionExpression(FormulaParser.java:1528) at org.apache.poi.ss.formula.FormulaParser.unionExpression(FormulaParser.java:1508) at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:1648) at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:159) at org.apache.poi.xssf.usermodel.XSSFCell.setFormula(XSSFCell.java:553) at org.apache.poi.xssf.usermodel.XSSFCell.setCellFormula(XSSFCell.java:533) at net.sf.jett.tag.FormulaTag.process(FormulaTag.java:183) at net.sf.jett.tag.BaseTag.processTag(BaseTag.java:231) at net.sf.jett.transform.CellTransformer.transformCellTag(CellTransformer.java:306) at net.sf.jett.transform.CellTransformer.transform(CellTransformer.java:124) at net.sf.jett.transform.BlockTransformer.transform(BlockTransformer.java:72) at net.sf.jett.transform.BlockTransformer.transform(BlockTransformer.java:34) at net.sf.jett.tag.BaseLoopTag.process(BaseLoopTag.java:513) at net.sf.jett.tag.BaseTag.processTag(BaseTag.java:231) at net.sf.jett.transform.CellTransformer.transformCellTag(CellTransformer.java:306) at net.sf.jett.transform.CellTransformer.transform(CellTransformer.java:124) at net.sf.jett.transform.BlockTransformer.transform(BlockTransformer.java:72) at net.sf.jett.transform.BlockTransformer.transform(BlockTransformer.java:34) at net.sf.jett.transform.SheetTransformer.transform(SheetTransformer.java:148) at net.sf.jett.transform.SheetTransformer.transform(SheetTransformer.java:74) at net.sf.jett.transform.ExcelTransformer.transform(ExcelTransformer.java:416) at com.madx.finance.data.utils.exels.ExcelTransformerOnFile.transform(ExcelTransformerOnFile.java:45) at com.madx.finance.data.utils.exels.ExcelTransformerOnFile.generateExel(ExcelTransformerOnFile.java:81) at com.madx.finance.data.gui.ExelFundsDowloaderApplication$2$1$1.run(ExelFundsDowloaderApplication.java:100)
And the second one (<jt:null text="=<span>[ColumnName0]</span>"/>) works only after "manually restored" from the user.
Is there a correct way for doing this?