Excel manipulation between two different excels

I have a datatable which looks like following lets call this dt_InfoTable

image

another datatable which looks like following lets call this dt_Template

image

now the task is following:

for dt_InfoTable for all the “Order Type” “ZIKB” i have to copy the “SAP Code” and “Store Location” and place it in the “Sold to Party” and “PO Number” columns in dt_Template. so if you see the first ss SAP Code- 1411053 and Store Location- Mani Square 2 - Kolkata will be placed in the first row of the table dt_Template. Then this two values will be copied down untill the last row (can vary from data to data) which is 20 in this case. then this 20 rows with all the values will be copied and appended from the 21st row in the template excel. Then from the 21st row the second SAP Code - 1411109 and Store Location for store Order Type- ZIKB will replace the older SAP Code and Store Location.

it should look like this :slight_smile:

we create one excel for one order type from dt_InfoTable . that means for all the order type ZIKB from dt_InfoTable we repeat the above described process. then we use the same template but then we fill it for next order type like “KB” or ZKB". So from one dt_Infotable we will have to create different dt_Template based on Order Type.

Its a bit complex so i would appereciate all the help that you can give me

Thanks in advance

HI @tarif.mohammad

Can you provide the sample excels?

Regards

Hi @anilkupatnaik

here are the excels
InfoTable.xlsx (10.9 KB)
Template.xlsx (9.0 KB)
Template_ how it should look like.xlsx (10.3 KB)

Info Table is the table where the data is picked according to order type and placed it in Template table. Template_how it should look like is the ideal output.

there will will be seperate excels filed with filled template for each Order type from Infotable. like one excel for ZIKB and one for ZKB one for KB and for other available order types