How to read range in excel file, then write to another excel file

dear all,

I have a problem wanna to solve it. I have some data in an excel files, like ![image|237x218](upload://wyiDE1nzcuv8OkHyFqe4a1yJVhy.png)  the row E - quantity, I want to read this row and write to another excel row G. the data in row E is variable, it means the content of data may be change, how could I deal with this problem. anybody could give me some guide ?  

thanks a lot in advance .

Best Regards

@chrisjiyiwei
Please re-upload your excel format image

excel1
like row E in this excel , then write to row AI in another excel file

the excel format image as follow.

Please refer below code structure
__Excel Application Scope (with file 1)
____Read Range:
______Sheet = “Sheet1” (please change to your sheet name)
______Range = “E1”
______Output DataTable = dtData (or other datatable variable as you want)

__Excel Application Scope (with file 2)
____Write Range:
______Sheet = “Sheet1” (please change to your sheet name)
______Range = “AI1”
______Input DataTable = dtData (or other datatable variable as you want)

1 Like

maybe it is wrong , it also write all the other data in excel 1 to excel 2, i just need row E1 in excel 1

Sorry i update my code
Do you need only E1 cell or whole E column?
in case you need ED1 cell only, please change the range of Read Range to “E1:E1”

__Excel Application Scope (with file 1)
____Read Range:
______Sheet = “Sheet1” (please change to your sheet name)
______Range = “E:E”
______Output DataTable = dtData (or other datatable variable as you want)

__Excel Application Scope (with file 2)
____Write Range:
______Sheet = “Sheet1” (please change to your sheet name)
______Range = “AI1”
______Input DataTable = dtData (or other datatable variable as you want)

I need the whole E column, how to solve this problem.

Use Excel application scope
and read range with Range = “E:E”, it will give you whole “E” column.

My newest code is for whole E column case

__Excel Application Scope (with file 1)
____Read Range:
______Sheet = “Sheet1” (please change to your sheet name)
______Range = “E:E”
______Output DataTable = dtData (or other datatable variable as you want)

__Excel Application Scope (with file 2)
____Write Range:
______Sheet = “Sheet1” (please change to your sheet name)
______Range = “AI1”
______Input DataTable = dtData (or other datatable variable as you want)