'所以,我决定采用WebTable的方式进行,我的方法如下:
Set w_WebTable = Browser("XXX").Page("XXX").Frame("XXX").WebTable("XXX")
For I = 1 To w_WebTable.RowCount
For J =1 To w_WebTable.ColumnCount(I)
'此行希望获取WebTable下的该单元格
Set CellValue = w_WebTable.ChildItem(I, J, "WebEdit" , 0 )
'此行希望将dtGlobalSheet中的值赋给该单元格
CellValue.Set DataTable("line"&J, dtGlobalSheet)
Next
Next
Set w_WebTable = Browser("XXX").Page("XXX").Frame("XXX").WebTable("XXX")
strRowCount = w_WebTable.RowCount
'w_WebTable.HighLight
For intRow = 1 To strRowCount
strColCount =w_WebTable.ColumnCount(intRow)
For intCol = 1 To strColCount
w_WebTable.ChildItem(intRow,intCol,"WebEdit",0).Set DataTable.GlobalSheet.GetParameter("line"&intCol).ValueByRow(intRow)
Next
Next
Set w_WebTable = Browser("XXX").Page("XXX").Frame("XXX").WebTable("XXX")
strRowCount = w_WebTable.RowCount
'w_WebTable.HighLight
For intRow = 1 To strRowCount
strColCount =w_WebTable.ColumnCount(intRow)
For intCol = 4 To strColCount
w_WebTable.ChildItem(intRow,intCol,"WebEdit",0).Set DataTable.GlobalSheet.GetParameter("line"&(intCol-3)).ValueByRow(intRow)
Next
Next