I am currently working on the excel automation. For this I am doing the following:-
Inside while loop I am doing data extraction (in other words I have the datatable)
Now, I am writing this dataTable into the excel.
In the second iteration, I get another data extraction(dataTable) which is appended to this one.
Now for this I want to know how do I get the cell number from where the appending on the second table will start such that there is no Empty row in between and also there is no overlapping.
I want to do this dynamically for multiple datatable appending in excel sheet.
append range activity itself will detect the first empty cell, you do not need to identify externally for this.
what is the purpose to know about the empty cell.? IF you want you can find this as Dt.rows.count
and keep adding this for every datatable will give you results.
Does your Excel starts in first row (1) ? if your Excel start in the first row of the wb, you will be able to know the last cell, if you count the length of DT Column.
use Build Data table activity to create a new data table from variables.
If you want to append to an existing excel , First use Read Range activity to read into data table and then use Merge Data table activity to merge the two data tables.
At last use Write Range activity to write it in an excel.