0
所以我正在尋找一個更快的方式來查詢智能表中的東西。 該API非常有用,但搜索功能非常有限。更快地查詢智能表?
截至目前,它的工作原理,但它非常非常緩慢。列表越長,填充列表花費的時間越長。
每當CAD用戶改變組合框到他們的名字,我搜索基於他們的名字在cbUsers.Text片
Private Sub cbUsers_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cbUsers.SelectedIndexChanged
If listJobQue.Items.Count > 0 Then
listJobQue.Items.Clear()
End If
Dim ss As New SmartSheetIntegration()
Dim result As SearchResult
result = ss.SearchQue(1737025469605764, cbUsers.Text)
For Each searchResult As SearchResultItem In result.Results
If searchResult.ObjectType = SearchObjectType.ROW Then
Dim rowID As Long
rowID = searchResult.ObjectId
rowIDs.Add(rowID) 'this stores the IDs for later use when they click on an item in the list box.
Dim row As Row = ss.GetRow(3083654818752388, "LIVE RFD INPUT", rowID)
listJobQue.Items.Add(row.Cells(6).Value)
End If
Next
End Sub
的SearchQue()是在這裏
Public Function SearchQue(sheetID As Int64, name As String)
Return smartSheet.SearchResources.SearchSheet(sheetID, name)
End Function
有誰知道這樣做更快,更有效的方式?
謝謝!