Doonline
(Doonlinejob23)
January 25, 2022, 12:20am
1
I have two datatables dt1 and dt2
dt1 contains
col1 col2 col3
47i ruk yfk
43 tulr6 lyruf
.
.
.
.
dt2 contains
col1 col2 col3 col4
xfy ruk zsr jcyf
stv tulr6 tdck hvc
.
.
.
and there is one more datatable which is empty i.e dtEmpty
I need to take 2 add datarows activity for for dt1 and one for dt2.
So,How to fill the dtEmpty
Bcoz my requirement is I need to take 1st row of dt1 in empty datatable then 1st row of dt2.Again 2nd row of dt1 and second row of dt2
plss help
Yoichi
(Yoichi)
January 25, 2022, 12:47am
2
Hi,
If count of dt1’s rows is same with count of dt2’s rows, the following will work.
Sample20220125-2.zip (3.0 KB)
Regards,
Doonline
(Doonlinejob23)
January 25, 2022, 1:02am
3
No datatable rows are not equal
column size of dtEmpty is same as dt2
Yoichi
(Yoichi)
January 25, 2022, 1:50am
4
How about the following?
Sample20220125-2v2.zip (3.3 KB)
Regards,
Doonline
(Doonlinejob23)
January 25, 2022, 2:01am
5
Here you have provided in second add data row activity
dt2.Rows(idx).ItemArray
what does it means?
and wht is idx?
Doonline
(Doonlinejob23)
January 25, 2022, 2:06am
6
what activity u have used here above write range?
It is not availble in my project.
Pls provide the package name nd activity name
Yoichi
(Yoichi)
January 25, 2022, 2:08am
7
Hi,
Doonline:
dt2.Rows(idx).ItemArray
This returns items in idx-th row as object array.
wht is idx?
It’s index number of Dt1 or dt2’s rows.
Pls provide the package name nd activity name
Please see the following image.
Regards,
Doonline
(Doonlinejob23)
January 25, 2022, 2:44am
8
activity which is used above write range
Yoichi
(Yoichi)
January 25, 2022, 2:50am
9
Can you clarify your problem?
Doonline
(Doonlinejob23)
January 25, 2022, 4:19am
10
In this xaml which activity you have used above write range.I m not able to see the activity in my project
please provide screenshot , so @Yoichi can understand better on the issues
regards ahmad
Yoichi
(Yoichi)
January 25, 2022, 4:23am
12
Hi,
Which compatibility do you use? if you use cross platform, you need to install Excel.Activites Package from Manage Packages as the following.
Regards,
Doonline
(Doonlinejob23)
January 25, 2022, 7:07am
13
What if I want dt2 values at a specific position of DtEmpty
Hi!
can we try like this
in first for each row read dt1->CurrentRow1 .
take one more for each row and read dt2->CurrentRow2 .
in add data row mention dt as your outputdt .
The output excel look like: col1-dt1|col1-dt2|col2-dt1|col2-dt2|col3-dt1|col3-dt2
in array of row mention like this:
{CurrentRow1(“Col1”).ToString,CurrentRow2(“Col1”).ToString,CurrentRow1(“Col2”).ToString,CurrentRow2(“Col2”).ToString,CurrentRow1(“Col3”).ToString,CurrentRow2(“Col3”).ToString}
in write range mention the dt as outputdt .
Regards,
NaNi
Yoichi
(Yoichi)
January 25, 2022, 8:56am
15
Hi,
We need to use DataRowColection.InsertAt method with InvokeMethod activity.
Regards,
system
(system)
Closed
January 28, 2022, 8:56am
16
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.