Hi ,
The telerik version we are using is : 2016.1.225.45.
We are facing an out of memory exception while trying to export close to 200k records using Telerik spreadsheet.
The for each loop snippet shown below executes for each of the 200k records.It is taking more than 5 mins. Is there any way to reduce the time consumption ?
Dim currentRow As Integer = 6
For Each row As DataRow In data.Rows
sheet1.Cells(currentRow, 0).SetFormat(New CellValueFormat("@"))
sheet1.Cells(currentRow, 0).SetValue(Convert.ToString(row("ClientID")))
sheet1.Cells(currentRow, 0).SetIsWrapped(True)
sheet1.Cells(currentRow, 1).SetFormat(New CellValueFormat("@"))
sheet1.Cells(currentRow, 1).SetValue(Convert.ToString(row("ShortName")))
sheet1.Cells(currentRow, 1).SetIsWrapped(True)
sheet1.Cells(currentRow, 2).SetFormat(New CellValueFormat("@"))
sheet1.Cells(currentRow, 2).SetValue(Convert.ToString(row("KnowledgeCategory")))
sheet1.Cells(currentRow, 2).SetIsWrapped(True)
sheet1.Cells(currentRow, 3).SetFormat(New CellValueFormat("@"))
sheet1.Cells(currentRow, 3).SetValue(Convert.ToString(row("AuthoredBy")))
sheet1.Cells(currentRow, 3).SetIsWrapped(True)
sheet1.Cells(currentRow, 4).SetFormat(New CellValueFormat("@"))
If IsDBNull(row("AuthoringDate")) Or String.IsNullOrEmpty(row("AuthoringDate").ToString()) Then
AuthoringDate = ""
Else
AuthoringDate = Convert.ToDateTime(row("AuthoringDate")).ToString("dd/MM/yyyy")
End If
sheet1.Cells(currentRow, 4).SetValue(AuthoringDate)
sheet1.Cells(currentRow, 4).SetIsWrapped(True)
sheet1.Cells(currentRow, 5).SetFormat(New CellValueFormat("@"))
sheet1.Cells(currentRow, 5).SetValue(Convert.ToString(row("IndustryName")))
sheet1.Cells(currentRow, 5).SetIsWrapped(True)
If ChangeType <> "Deleted Records" Then
sheet1.Cells(currentRow, 6).SetFormat(New CellValueFormat("@"))
sheet1.Cells(currentRow, 6).SetValue(Convert.ToString(row("TranslationChange")))
sheet1.Cells(currentRow, 6).SetIsWrapped(True)
sheet1.Cells(currentRow, 7).SetFormat(New CellValueFormat("@"))
sheet1.Cells(currentRow, 7).SetValue(Convert.ToString(row("Comment")))
sheet1.Cells(currentRow, 7).SetIsWrapped(True)
Else
sheet1.Cells(currentRow, 6).SetFormat(New CellValueFormat("@"))
sheet1.Cells(currentRow, 6).SetValue(Convert.ToString(row("Comment")))
sheet1.Cells(currentRow, 6).SetIsWrapped(True)
End If
currentRow = currentRow + 1
Next
Also while exporting the worksheet, an out of memory exception is thrown. Please provide some help over the issue.