Read data from excel and write into another excel (Only get the last column data)

Hi There,

As subject, I’m using if else to get the data I want from excel and write into another excel using write range, I can read all the data I want but when i write into another excel, it will only write in the last column data. Please assist.

Its better to use FilterDatatable, rather using foreach row.

wait, i will send you the template regarding it

Thanks bro!

Could you share your condition and last column name ??

make sure the condition is proper, i will send the configured filter datatable for you to use

Hi @ack940129

Can you share the sample input and excepted output

Regards
Gokul

Hi, is ok you can share me the template and I can modify myself. Thanks

202112 Big Data Area MYtest.xlsx (12.0 KB)
MYMAS SST REBATE FORM_R2 Template.xlsx (9.7 KB)

Hi Sir,

Here you go, i want to get the data (Invoice & Inv. date) from Big Data Area MYtest excel file where Customer name = ABB001, then insert into another excel which is SST REBATE FORM_R2 Template

FDT_keep

FDT_keep_condition

i have sent you the snap shots of filter datatable option where “FDT” is the datatable which is set to have the filtered data column if the above screenshot procedures are followed.

and then connect this “FDT” datatable to write range activity by providing the starting point of the specific excel file where you want your data to be stored. The screenshot of the explained process is shared below.

Write_Range

if any doubt, with feel free to ping me here and if you got your answer please acknowledge my solution.

Regards,
NJ

Hi @ack940129

Here is the workflow

FilterBigdata.xaml (6.7 KB)
OutputBigData.xlsx (7.4 KB)

Hope it will work

Regards
Gokul

Hi @ack940129 ,

Could you try this and see if it works out for you?

dt_sampleData.AsEnumerable().
	Where(Function(w) w("Customer").ToString.Trim.Equals("ABB001")).
	Select(Function(s) dt_result.LoadDataRow({"","",System.Text.RegularExpressions.Regex.Match(s("Inv. date").ToString,"\d+\/\d+\/\d+"),s("Invoice")},False)).CopyToDataTable()

RetrieveLastTwoColumns.xaml (9.0 KB)

Kind Regards,
Ashwin A.K

Untitled

It is working fine according to the image code that you’ve sent @ack940129
​​
​​​
​​​​
​​​

Thanks a lot!! I will try it out later!

Thanks a lot I will try it out later!

Yeah, @ack940129 Ack940129 if it worked out well. please do acknowledge my solution and try to give a follow if possible. thank you i hope it would work better for you.

Regards,
NJ

1 Like

Hi @Prodigy_26, that is works but my template do have quite a lot of header which that will be deleted if I’m using this way as I need to copy the data from different excel and paste into the template I have

1 Like

Hi @Gokul001, that is works but my template do have quite a lot of header which that will be deleted if I’m using this way as I need to copy the data from different excel and paste into the template I have

Hi @ack940129

Can you elaborate little bit?

If possible can you share the output file

Regards
Gokul