Cell format of XLSX Template

How to change the format of the data in XLSX report templates? I would like to change the format of the Distance in Trip Report, as example, to numeric column to able the use of Excel sum feature. Another formatting problem is the decimal separator symbol that for us is a comma rather than a dot.
I modified the formula below "%.1f" to remove "km/mi" from value, but Excel still does not consider numerical.

${distanceUnit.equals("mi") ? "".format("%.1f", trip.distance * 0.000621371) : distanceUnit.equals("nmi") ? "".format("%.1f", trip.distance * 0.000539957) : "".format("%.1f", trip.distance * 0.001)}

I believe the solution is in "".format but I can not find documentation about it. Any Help?

Anton Tananaev6 years ago

You can find documentation here:

http://jxls.sourceforge.net/getting_started.html

Thanks Anton,
I tried bellow modification in the trips template, H9 cell formated as numerical, but it was not enough, the data is stored as a string:
numberTool.format(trip.distance * 0.001)}
From what I understand from JXLS docs, I will not get what I need by just changing the XLSX file, correct?
The question is, since the file is in Excel, if numerical values are formatted, it is easier to use the data analysis capabilities and even Excel's own graphics generation.

Anton Tananaev6 years ago

I don't know the answer. I've never tried what you are trying to do, so you are on your own.

Santiago8 months ago

Hello, someone managed to convert the values to numbers to take advantage of the Excel calculation.