Hello,

I'm looking to export a weighted cross tabulation from stata to excel. The variables I am tabulating are 'naics2017' and 'skills' (both labeled integers).

I just also posted about this in another thread here, but since the only other participant in that thread is not a frequent poster, I have decided to start this separate thread on this question.

This is my stata code:
Code:
svyset cluster [pweight = perwt], strata(strata)
tab naics2017 skill [iweight = perwt], row
And this is my stata output, which I would like to export to excel:
Code:
              
            naics2017 |       n/a  low-gener  high-gene   specific |     Total
----------------------+--------------------------------------------+----------
           Unemployed |   1863042          0          0          0 |   1863042 
                      |    100.00       0.00       0.00       0.00 |    100.00 
----------------------+--------------------------------------------+----------
  Outside Labor Force | 132248332          0          0          0 | 132248332 
                      |    100.00       0.00       0.00       0.00 |    100.00 
----------------------+--------------------------------------------+----------
Agriculture, Forestry |    199944     196790     922683    1317452 |   2636869 
                      |      7.58       7.46      34.99      49.96 |    100.00 
----------------------+--------------------------------------------+----------
Mining, Quarrying, an |        94      68227     452293     409313 |    929927 
                      |      0.01       7.34      48.64      44.02 |    100.00 
----------------------+--------------------------------------------+----------
           Utilities  |      1385     258077     840629     365116 |   1465207 
                      |      0.09      17.61      57.37      24.92 |    100.00 
----------------------+--------------------------------------------+----------
        Construction  |      4628    2807564    3410727    5822133 |  12045052 
                      |      0.04      23.31      28.32      48.34 |    100.00 
----------------------+--------------------------------------------+----------
        Manufacturing |      7194    2454982    7705827    8358803 |  18526806 
                      |      0.04      13.25      41.59      45.12 |    100.00 
----------------------+--------------------------------------------+----------
     Wholesale Trade  |      1633    1046252    2797857     885295 |   4731037 
                      |      0.03      22.11      59.14      18.71 |    100.00 
----------------------+--------------------------------------------+----------
        Retail Trade  |      2569   16907834    3451282    1928593 |  22290278 
                      |      0.01      75.85      15.48       8.65 |    100.00 
----------------------+--------------------------------------------+----------
Transportation and Wa |      2096    2790155    1521786    3782979 |   8097016 
                      |      0.03      34.46      18.79      46.72 |    100.00 
----------------------+--------------------------------------------+----------
         Information  |       300     746352    2636463     406738 |   3789853 
                      |      0.01      19.69      69.57      10.73 |    100.00 
----------------------+--------------------------------------------+----------
Finance and Insurance |         0    1901401    6101235      41115 |   8043751 
                      |      0.00      23.64      75.85       0.51 |    100.00 
----------------------+--------------------------------------------+----------
Real Estate and Renta |      2299     822441    2573051     272503 |   3670294 
                      |      0.06      22.41      70.10       7.42 |    100.00 
----------------------+--------------------------------------------+----------
Professional, Scienti |      2045    1040144   11183257     296107 |  12521553 
                      |      0.02       8.31      89.31       2.36 |    100.00 
----------------------+--------------------------------------------+----------
Management of Compani |       123      27786     161661       5979 |    195549 
                      |      0.06      14.21      82.67       3.06 |    100.00 
----------------------+--------------------------------------------+----------
Administrative and Su |    170487    4751960    2719510     926562 |   8568519 
                      |      1.99      55.46      31.74      10.81 |    100.00 
----------------------+--------------------------------------------+----------
Educational Services  |      3297    3651622   13053558     542366 |  17250843 
                      |      0.02      21.17      75.67       3.14 |    100.00 
----------------------+--------------------------------------------+----------
Health Care and Socia |      2147    8554652   16190130     408883 |  25155812 
                      |      0.01      34.01      64.36       1.63 |    100.00 
----------------------+--------------------------------------------+----------
Arts, Entertainment,  |     18950    1933996    2313321     406636 |   4672903 
                      |      0.41      41.39      49.51       8.70 |    100.00 
----------------------+--------------------------------------------+----------
Accommodation and Foo |      1020   11682777    3161060     552139 |  15396996 
                      |      0.01      75.88      20.53       3.59 |    100.00 
----------------------+--------------------------------------------+----------
Other Services (excep |      4977    4454161    3106563    1803892 |   9369593 
                      |      0.05      47.54      33.16      19.25 |    100.00 
----------------------+--------------------------------------------+----------
Public Administration |    610192    1991894    6527783     528414 |   9658283 
                      |      6.32      20.62      67.59       5.47 |    100.00 
----------------------+--------------------------------------------+----------
                Total | 135146754   68089067   90830676   29061018 | 323127515 
                      |     41.82      21.07      28.11       8.99 |    100.00
I would appreciate your advice on this roadblock.

Best,
Rosa