Hi everyone, I have the following code:

table prov immig sex if inlist(immig,1,2)

and I am trying to export the table to overleaf. I tried eststo and estout commands but apparently, they are only used for regression tables. I also tried:

tabout prov immig sex if inlist(immig,1,2) using table1.txt

but the created file is not in txt format.

I was wondering if anyone knows how I can export this table to latex? am I missing something in the codes?
Thanks