Hello All,Preformatted text
I want to copy previous month records(december [8.12.2021]&[14.12.2021]) from attached excel screenshot (Delivery Date) and (No of Litres) and paste it into another sheet.
Can anybody please help me in this?
Hello All,Preformatted text
I want to copy previous month records(december [8.12.2021]&[14.12.2021]) from attached excel screenshot (Delivery Date) and (No of Litres) and paste it into another sheet.
Can anybody please help me in this?
Hi @Poonam_Yadav,
As you mentioned in your query, there is no excel document. Can you share the document which would be helpful to sort out the issue further.
Regards,
@90s_Developer
Hi! @Poonam_Yadav ,
if you wants to write the existing columns in to another excel please follow the below steps:
1.Excel Application inside that Read Range from Excel output as dt1.
2.Take one for each row in data table. mention as dt1.
3.Take one Build Data table and create the required columns like this column1,Column2 and so on… output as BuildDt
take required assign activities
Take one Add data row activity->Properties ArrayofRow pass the values like this
{Column1,Column2} and mention dt as BuildDt.
Outside the all for each rows
Take one Excel Application Scope
Write range from Excel output as BuildDt
save and run
Regards,
NaNi
Hi @Poonam_Yadav,
Follow the below steps,
Use Build Data, and create the columns which you required in the output datatable. According to your query create two columns [Delivery Date, No of Litres]
and create the datatable variable for the build datatable e.g: OutputExcelResultDT.
Now, read the input excel which you have the data using Read Range (Workbook) and create the datatable variable for that read range e.g: MailExcelDT
Now use assign activity and assing the value to the Build Datatable variable
OutputExcelResultDT = (From dr1 in MailExcelDT.AsEnumerable() Select OutputExcelResult.LoadDataRow(New Object() {dr1("Delivery Date").ToString, dr1("NoOfLitres").toString},false)).CopyToDataTable
Use Workbook Write Range activity, and pass the OuputExcelResultDT as the input.
Based on the column you required, you need to fill into the expression by adding the values with the required column from the main excel
NOTE:
OutputExcelResultDT - newly created Datatable which is further passed as the input to the write range
MailExcelDT - Datatable variable which holds the main file data.
I hope you will be able to achieve your result with this LINQ query.
Regards,
@90s_Developer