你的数据表格有空格,要这样处理,保存,执行下面代码
Dim t As Table = Tables("订单明细表")For Each r As Row In t.Rows For Each c As Col In t.Cols If c.IsString Then r(c) = r(c).trim() End If NextNext