Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
To export worksheet data to a specific DataTable object:
The example below creates a specific DataTable object with four columns. The worksheet data is exported starting from the first cell with all the rows and columns visible in the worksheet, to a DataTable object already created.
Sometimes, you don’t want to create a DataTable object but simply need to export the worksheet data to a new DataTable object.
The example below tries a different way to show the use of the Export method. It takes the reference of the active worksheet and exports the complete data of that worksheet to a new DataTable object. The DataTable object can now be used in any way you want. For example, it is possible to bind the DataTable object to a GridView to view the data.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.