sysuse auto,clear
drop make
mkmat _all, mat(a)
mat income = a[2..5, 2..3]
mat B = J(10,7, .)
mat B[5,6] = income
preserve /*防止改变原有数据*/
clear
svmat B, names(col)
outsheet using "C:\Documents and Settings\new\桌面\income.raw", replace
restore
* income.raw 文件可以采用 Excel 打开,即可得到你想要的结果。