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
I am getting data in exceldataDT now I want to add in this datatable two variable c_payloss,p_payloss in new excel sheet as attachment
Do you want to add extra 3 columns to existing excel file ?
What do you mean by
represent columns in the datatable?
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
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.
And finally use Write Range activity to write into required excel file.
Yes. @lakshman is always at our service . just fun…
I am seeing many people are giving very good reply to the thread. You are the one of person.I appreciate you …
Thanks bro @balupad14. It means a lot to me.
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)
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.
thanks man for your help.Now I am getting this message as mention in attachment.In this I used filtert datatable outside for each loop but I did’t use build data table.So I also create build data table
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