Here is a DataTable dt in which there is a lot of data.
I want to get a specific Cell Value from a DataTable, say Cell [i, j] . Where, i β Rows and j β Columns. I will forloops over the value of i, j with two forloops .
But I canβt understand how I can call a cell my index.
Here is the code:
for (i = 0; i <= dt.Rows.Count - 1; i++) { for (j = 0; j <= dt.Columns.Count - 1; j++) { var cell = dt.Rows[i][j]; xlWorkSheet.Cells[i + 1, j + 1] = cell; } }
Abdur Rahim Dec 11 2018-12-12T00: 00Z
source share