我正在尝试使用存储为字典项的数组中的值填充工作表中的单元格。
我可以遍历字典项,但是在执行类似rowDict(key).Item(0)
Set rowDict = CreateObject("Scripting.Dictionary")
Set rng = .Range(.Range("C2"), .Range("C" & .Rows.Count).End(xlUp))
' get all row data
Set rowData = .Cells(1, 1).CurrentRegion
' it through rowS and add row to dictionary with column 3 value being the key for each row
For iRow = 2 To rowData.Rows.Count
rowKey = Left(rowData.Cells(iRow, 3), 29)
rowDict(rowKey) = rowData.Rows(iRow)
Next iRow