0
votes

When I try to create an excel then out some value in it I get this error. Pricee is defined before as double. I checked value is correct. I do not know where to look?

cell = row.createCell(6);
setCellStyle();
cell.setCellType(Cell.CELL_TYPE_NUMERIC);       cellStyle.setDataFormat(createHelper.createDataFormat().getFormat("#,##0.00"));
cell.setCellValue(pricee);

ERROR:

com.ibm.jscript.InterpretException: Script interpreter error, line=1329, col=35: Ambiguity when calling setDataFormat(int) and setDataFormat(short)
1

1 Answers

0
votes

SSJS marshalles untyped JS to typed Java. It works reasonably well, but not 100%. Best is to create a Java bean you call from SSJS and hand over the document or collection as parameter.

Makes your life easier, since you can test and debug on local command line.