Exporting of selected rows in the grid to the Data Table

Hi,

I'm using Aspose.Grid, in this i have to export only one row to the data table. But for this I have to export all the worksheet to the data table, which is taking time. Is there any way to export only the selected row to the data table in the worksheet?

I'm using this code:

Public Function ExportDataEntryDataTable(ByVal grdData As GridDesktop, ByRef ldtAllData As DataTable, Optional ByVal lintColCount As Integer = 0) As DataTable
Try
ldtAllData = grdData.Worksheets(0).ExportDataTable(0, 0, grdData.Worksheets(0).RowsCount, lintColCount, True, True)
'ldtAllData = grdDataEntry.Worksheets(0).ExportDataTable(0, 0,grdDataEntry.Worksheets(0).RowsCount, 24, True, True)
_DuplicateFundData = ldtAllData
Return ldtAllData
Catch ex As Exception
MessageBox.Show(ex.Message)
Return Nothing
End Try
End Function

Hi,

Thank you for considering Aspose.

Well, in Worksheet.ExportDataTable method you can provide the starting rowIndex and rowNumber for which you want to export the data only. Please see the following details about the ExportDataTable parameters.

firstRow

The row number of the first cell to export. (provide the index of the row you want to Export)

firstColumn

The column number of the first cell to export.

rowNumber

Number of rows to be exported.

columnNumber

Number of columns to be exported.

Please see the following documentation link for your reference,

Thank You & Best Regards,