Hi I have data in data table as mentioned in untitled attachment now I want create new excel sheet in this excel sheet data table value insert and add three column value Loss_cal,DC_cal,AO_cal as mention in untitled1 attachment.I want merge datatable and three variable in new excel sheet.How can I achieve this
@balupad14 @lakshman can you help me on this
Do you want to add extra 3 columns to existing excel file ?
What do you mean by
Do these
represent columns in the datatable?
Cheers
as mention in above screen shot in for each row ExcelDataDT I am getting data.I have 3 variable C_payloss,p_payloss,AO_payloss.Now I want create new excel and merge 3 variable value in datatable
eg I have excel sheet with column name A,B,C,D,E and data 1,2,3,4,5 and I am getting value in this using for each row
A B C D E
1 2 3 4 5
new excel sheet will be
A B C D E C_payloss p_payloss AO_payloss
1 2 3 4 5 6 7 8
Ok understood.
-
First create DataTable using Build DataTable activity with all 8 columns.
-
Then use ForEach Row activity to iterate your data of 5 columns. Inside this loop, use Add DataRow activity and pass Array Row like this.
{row(0).Tostring,row(1).Tostring,...row(4).Tostring,C_payloss.Tostring,p_payloss.Tostring,AO_payloss.Tostring}
And finally use Write Range activity to write into required excel file.
Yes. @lakshman is always at our service . just fun…
Hehe ![]()
![]()
Yes @lakshman,
I am seeing many people are giving very good reply to the thread. You are the one of person.I appreciate you …
Regards
Balamurugan.S
Thanks bro @balupad14. It means a lot to me.
I am not seeing our other guys @Palaniyappan , @Lahiru.Fernando … ![]()
![]()
![]()
![]()
Regards
Balamurugan.S
hehe here i m
bit busy with a bot development…i will be back in few mins… @balupad14
But you are at spot service ya .(Fun thambi)![]()
![]()
![]()
![]()
Regards
Balamurugan.S
hehe
@balupad14
How to merge two variable value with existing data table
Hey bro @balupad14 … Sorry… I saw the message, but couldn’t reply because I got stuck with meetings… We are getting ready for the meetup… lot of things to do… That’s why I’m not much active in replying to topics this week. But I am always online over looking what is happening… After 10th, I will be fully active here as usual… I’m having a meetup practice trial tomorrow with the internal people… So have lot of preparations from my side too… it’s the first event, so it has to be good… Many Sri Lankan people here in the forum also reached out to me… I’m really looking forward to meet them live too…
You @Lahiru.Fernando bro. You told about the meet up. I forgot it. Wishes to enjoy the event.
Regards
Balamurugan.S
This error implies that the number of elements mentioned in the ArrayRow property is more than the actual number of columns in your datatable
Kindly check that once
Cheers @Aditya10989



