Dear experts,

I am currently exporting my stata table to Overleaf (LaTeX) using estpost and esttab.
When I define number formatting for a cell it unfortunately applies it to all statistic I have. For example, while I generally want 3 decimals for my column Variable8, I do not want 3 decimals for the row statistic N as the number of observation has no deecimals. Can I format the row statistic N so it overwrites the variable formatting?

Additionally, is it possible that stata does not output me values for certain statistics? For example for Variable5, I only want to show mean, sd and N as statistic while the rest of the column should be blank.

Here is my current code:
Code:
estpost tabstat Var1 Var2 Var2 Var3 Var4 Var5 Var6 Var7 Var8,  stats(mean sd min p25 med p75 max N)

esttab . using "${DropboxLocation}/Apps/Overleaf/SummaryStatistics.tex", c("Var1(fmt(%9.0fc)) Var2(fmt(%9.3gc)) Var3(fmt(%9.3gc)) Var4(fmt(%9.3gc)) Var5(fmt(%9.3gc)) Var6(fmt(%9.3gc))  Var7(fmt(%9.3gc)) Var8(fmt(%9.4gc))") nomtitles nodepvars nonumbers noobs collabels("VarName1" "VarName2" "VarName3" "VarName4" "VarName5" "VarName6" "VarName7" "VarName8") varlabels(p25 "25\%" p50 "median" p75 "75\%" count "N", elist(sd \midrule max \midrule count \bottomrule)) frag booktab replace