For c As integer = 0 To tbl.Cols.Count - 1 rt.Cells(0,c).Text = tbl.Cols(c).Name For r As integer = 0 To Rows.Count -1 rt.Cells(r + 1, c).Text = rows(r)(tbl.Cols(c).Name) Next Next rt.Cells(tbl.Cols.Count,8).Text = "小计" rt.Cells(tbl.Cols.Count,9).Text = tbl.Compute(.......)