Dim str As String = "投标单位|投标报价|项目负责人|质量标准|工期|投标保证金|信用分|资信分值|技术分值|开标备注|评标备注|标书备注|联合体成员|序号"
Dim stt As String = "投标单位名称|投标总价(元)|项目经理|质量标准|工期(天)|投标保证金缴纳情况|信用分值|资信分值|技术分值|开标备注|评标备注|标书备注|联合体成员|序号"
Dim dict As New Dictionary(Of String, String)
For Each st As String In stt.Split("|")
If st > "" Then
For Each nm As String In str.Split("|")
If dict.ContainsKey(st) AndAlso dict(st).Split("|")(0).Length >= nm.Length Then Continue For
For i As Integer = nm.Length To 2 Step - 1
If dict.ContainsKey(st) AndAlso dict(st).Split("|")(0).Length >= i Then Continue For
Dim b As Boolean = False
For k As Integer = 0 To nm.Length - i
Dim nmm As String = nm.Substring(k, i)
If st.Contains(nmm) Then
If dict.ContainsKey(st) Then
If dict(st).Split("|")(0).Length < nmm.Length Then
dict(st) = nmm & "|" & nm
End If
Else
dict.Add(st, nmm & "|" & nm)
End If
'nr("接收表列名") = nm '自动选出列名
' Output.Show(st & " => " & nm & " : " & k & "," & i & "=" & nmm)
b = True
Exit For
End If
Next
If b Then
Exit For
End If
Next
Next
End If
Next
For Each key As String In dict.Keys
Output.Show(key & "=>" & dict(key))
Next