Hello! I have process, where I need many time paste DT in one excel file one by one.
For example I pasted the first DT. I check DT.Rows.Count
. And count will be 11297 . I need take the second DT and paste in 11298 row. But how I can convert 11298 to excel cell?(AFG123 for example)
could it be the case that:
-
you want to add table data one below the existing
- use append range
-
you want to store the table side by side
- get column index letter from index with the help of:
- get column index letter from index with the help of:
I didn’t understand, how I can use it?
I always have column, but different rows
Hi,
Instead of adding each DT in excel you can add all DTs data into one separate temp datatable and once it is done finally you can write range the temp data table into excel after the loop.
Please try this way. I hope it can help
If I have fill DT, how I can add new DT ?
Are you giving multiple DTs in one loop for adding data in to excel? then
Follow the below steps
Step-1: Create new Data table with ‘Build Data Table’ activity along with your required columns
Temp Data Table Name - DT_TempDataTable
Step-2: Now Create data row variable inside the existed DT (which you are copying) loop
dataRow = DT_TempDataTable.NewRow //Variable type is System.Data.DataRow
Step-3: Now add the row item value in to temporary data table
dataRow(“Column1”) = row.Item(“Column1”) //Same way assign for other matching columns
Step-4: Add the row in to temp data table using ‘Add Data Row’ -
Add Data Row - in Properties assign the variable ‘dataRow’ in DataRow Filed
Step-5: Ends the Foreach Loop of DTs
Step-6: Finally use Write Range workbook activity and pass the excel file name and DT_TempDataTable. So it writes complete data into excel
I didnt’t understand this
can you please provide the sample flow file or detailed screenshots?
AddDataTableDataToExcel.zip (14.6 KB)
Hi Please find the attached sample flow.
Let me know if any issues