Hi

I have not had Stata for too long and am trying to create a Word export from Stata.
Unfortunately, Stata rounds down or up my data when exporting.

In the Stata browse, the number is stored as follows:
2.501e+09
Type: double, Format: %10.0g

My syntax is:
Code:
putdocx table Table1(1,1) = ("sample number")
putdocx table Table1(1,2) = (samplenr), nformat(%-16.0g)
The output in the Word: 2501500000 instead of 2501466707.

As soon as the number has fewer digits, it works fine and the number is not rounded - but it is then stored in Stata as long, %12.0g.

Does anyone on the forum have experience with putdocx commands and would be kind enough to help me? I'm using Stata, version 17 and Microsoft365, thanks in advance. :-)