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)
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. :-)
0 Response to Export Word putdocx
Post a Comment