参考代码
Dim t As Table = Tables("表A")For Each c As Col In t.cols Dim nstr As String = "" For Each s As String In c.Name nstr &= s & vbcrlf Next c.caption = nstrNextt.DataTable.BuildHeadert.AutoSizeHeaderRow