need to read in the same column every cell into it (Cell by cell)
If your datatable and excel file are aligned, to read each row you need to specify the row number in the range.
You could use the index of the for each row + 2 (header row + excel starts at index 1).
so it could be Read Cell - Range = "AE"+ intRowIndex.tostring
Hi @Soudios ,
Would you be so kind as to explain a bit more as to what it is you are trying to achieve with this code?
We can come up with a proper end to end resolution once we get a clear picture and maybe even suggest some enhancements.
Kind Regards,
Ashwin A.K
i need to read a cell into a for each activity but not the same cell ( i need to read the cell corresponding to the for each) AE1 AE2 AE2…
Hi @Soudios ,
The Range is a combination of Letters and Numbers e.g. A1, A2…
So in your case, you have to do this:
"AE" + Int_Index.ToString
If even the letters are dynamic, we can works something out.
Kind Regards,
Ashwin A.K
i can’t use the counter in this case because the row doesnt start from row 1 and the next row is not necessary row 2
Sorry, I mean int_RowIndex.
"AE" + Int_RowIndex.ToString
Kind Regards,
Ashwin A.K
Don’t do this. You don’t loop through and read the cells one by one. Use Read Range to get the whole sheet into a datatable. Then you use the datatable to do what you want.
Ok for reading the datatable its ok but how can i do to write on the right cell on following to good index
You don’t write back to individual cells. Read the whole sheet into a datatable, manipulate the data in the datatable, then write the whole thing back to Excel.