Org-mode radio table orgtbl-to-latex :fmt wont accept float

I'd like to embed org-mode tables in my latex files and have org mode take care of formatting floating point numbers. Based on A.6.2 of the org-mode manual (http://orgmode.org/org.pdf) I expected this to work, in particular to produce 1.0 & 2.0 \\:

\documentclass{article}
\usepackage{comment}
\begin{document}
\begin{comment}
#+ORGTBL: SEND table-name orgtbl-to-latex :splice t :fmt (1 "%.3s" 2 "%.2f")
| 1.000 | 2.000 |
\end{comment}
\begin{tabular}{lrr}
\end{tabular}
\end{document}

However, it doesn't. Instead i get an error: Format specifier doesn't match argument type

Any ideas? Is %s the only supported format or am I missing somthing? (Why?)

• I can work around it by producing additional formatted colums and skip the original, but that seems messy. – kidmose Dec 20 '16 at 15:00

One approach would be to calculate additional columns and skip the originals:

#+ORGTBL: SEND correlation-detection-outcomes orgtbl-to-latex :splice t :skipcols (1 2)
| 1 |  2 |
#+TBLFM: $3=$1;%.2f::$4=$2;%.2f

note the added #+TBLFM: $3=$1;%.2f::$4=$2;%.2f, which that has to be executed (?) by putting the point on it an pressing C-c C-c before doing the same on the table.

This do however seem bloaty and unecessarily hackish.

Exploiting the possibility for :fmt to be a function it can be done as follows:

\documentclass{article}
\usepackage{comment}
\begin{document}
\begin{comment}
#+ORGTBL: SEND table-name orgtbl-to-latex :splice t :fmt (lambda (str) (format "%.2f" (string-to-number str)))
| 1.000 | 2.000 |
\end{comment}
\begin{tabular}{lrr}