DataTable tbl = new DataTable();
for(tbl.row=10; tbl.row<=15;tbl.row++) { for(tbl.colum=5; tbl.colum<=10;lt;=15;tbl.colum++) { string cell=[tbl.row].[tbl.colum] } }
//dataTab is the datatable //reading all the data for all rows and columns. for (int j = 0; j < dataTab.Rows.Count; j++) { for (int i = 0; i < dataTab.Columns.Count; i++) { Console.WriteLine(dataTab.Rows[j][i]); } } //Reading data for rows 10 to 15 and columns 5 to 10 //j is used for rows for (int j = 9; j < 15; j++) { //i is used for columns for (int i = 4; i < 10; i++) { Console.WriteLine(dataTab.Rows[j][i]); } }
j=10
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)