19-12-25 05:42 AM
Hi Team,
Has anyone encountered a massive performance difference in reading excel file with approx 20k records in BP v7.4.1?
excel file in v6.10 in 2-5 seconds but the same file is taking more than 30mins in v7.4.1.
Using Get worksheet as Collection(Offset) action to read the data.
Please let me know if there are any suggestions.
Thanks,
Nandha
19-12-25 10:41 AM
Excel VBO takes time to read data if data is more than 12K, how you can try OLEDB VBO to read data from excel file without opening it or you can use below code to read data from closed excel file and also from csv file.
Paste this below code in global code and call this function in code stage and necessary DLLs
Public Function ExcelSheetRead(ByVal filepath as String,sheetname as string, distinct as string, textformat as boolean) As DataTable
Dim dt As DataTable = New DataTable()
Dim Con As OleDbConnection
if textformat = true then
Con = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source=" & filepath & ";Extended Properties=" + ChrW(34) & "Excel 12.0 Xml;HDR=No;IMEX=1;ImportMixedTypes=Text;" + ChrW(34) & ";")
else
Con = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source=" & filepath & ";Extended Properties=Excel 12.0;")
end if
Con.Open()
Try
Dim SQLQuery as string
if distinct = "Yes" then
SQLQuery = "Select Distinct * from [" & sheetname & "$]"
else
SQLQuery = "Select * from [" & sheetname & "$]"
end if
Dim oCon As OleDbCommand = New OleDbCommand(SQLQuery,Con)
Dim adp As OleDbDataAdapter = New OleDbDataAdapter(OCon)
adp.Fill(dt)
Catch e_ As Exception
End Try
Con.Close()
Return dt
End Function
19-12-25 12:00 PM
Hi @Nandhakumar
We have recently done an update to the asset 10.6.2, it may not have made it to the DX just yet, so keep an eye out.
We recently revised the asset and if you try using the "Value2" as the fetchDatawithMethodValue, I am sure you will see the results you desire.
Thanks for bringing this to our attention.
regards