According to the "putdocx table" documentation, it should be possible to format cells in the table, as in line 10 in the script below.. E.g for means I get 7.861702 which I want to reduce to two decimal points. The loop works well, but when I try to format cells by inserting a nformat command (line 10) I get the error message "option not allowed".
Anybody know how to reduce number of decimals in this example?

I am using Stata SE 15.0


.
. forvalues i = 3/150{
2. putdocx paragraph, halign(left)
3. putdocx text ("Kommune `: label (K) `i''"), bold
4. foreach var in Fornøydhet Meningsfylt Ensom{
5.
. putdocx paragraph, halign(center)
6. putdocx text ("`var'")
7. preserve
8. statsby n=r(N) mean=r(mean) se=r(se) lb=r(lb) ub=r(ub), by(aldergr3) clear: ci mean `var' if K==`i'
9. putdocx table `var' = data("n mean se lb ub aldergr3"), varnames border(start, nil) border(insideV, nil) border(end, nil)
10. putdocx table `var'(2,3), nformat(%5.2f)
11.
.
. restore
12. }
13. }
(running ci on estimation sample)

command: ci mean Fornøydhet if K==3
n: r(N)
mean: r(mean)
se: r(se)
lb: r(lb)
ub: r(ub)
by: aldergr3

Statsby groups
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
...
option nformat(%5.2f) not allowed