Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
To export the Grid contents to a specific DataTable object, please follow the steps below: Add Aspose.Cells.GridDesktop control to your form.
In the example given below, we have created a specific DataTable object having four columns. Finally, we exported worksheet data (starting from the first cell, containing 69 rows and 4 columns) to the DataTable object already created by us.
Example:
Sometimes, developers may not be interested in creating their own DataTable object and might have a simple need to just export the worksheet data to a new DataTable object. It would be the quickest way for developers to export the worksheet data.
In the example given below, we have taken a different approach to demonstrate the usage of the ExportDataTable method. We obtained a reference to the currently active worksheet and then exported the complete data of that worksheet to a new DataTable object. This DataTable object can be used in any way a developer wishes. For example, a developer may bind this DataTable object to a DataGrid to view the data.
Example:
ExportDataTable method that simply returns a new DataTable object containing data exported from the worksheet.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.