How to read column in excel file and copy into another excel file

excel
activities

#1

Hi,

I want to copy a specific column(which has no name for column) from excel file and to copy it into another excel file with some header name.

 How can i do it using UIPath.
 Please suggest me or please give me a sample file regarding my question,if there.

#2

@krishna124

  1. create new dataTable with your required column name.
  2. Read the the original excel and store it in a datatable.
  3. Using for each row add ur required column value to new datatable using add datarow activity

#3

Hi,
I am new to uipath,can u please give me a example program.


#4

@krishna124 can i have sampe excel file of urs


#5

sample.xlsx (11.9 KB)

I have excel file like this,from this i have to read column A and Column B(which is divided into separate parts) and have to write column B into 3 different Columns.


#6

@Manjuts90 Is it possible in UIPath


#7

@Manjuts90
I have excel file like this,from this i have to read column A and Column B(which is divided into separate parts) and have to write column B into 3 different Columns.sample.xlsx (11.9 KB)


#8

@krishna124 U want to write column b into 3 different columns of another datatable. Am i correct?


#9

@Manjuts90

I have to write Coumn A and Column B(Which is divided into 3parts into 3 different columns) into an excel file.


#10

@krishna124
Capture
column b has 4 values, how u want to divide these 4 values among 3 columns.


#11

@Manjuts90

Ohh Sorry, it has 4 different values,i think there is only three.

I want to write 4 values into 4 different columns.


#12

@krishna124 u want solution in uipath or just explanation about how u do it?


#13

@Manjuts90 I want the solution of it.


#14

@krishna124 try below code. u will get solution.

sample-----.xaml (16.4 KB)

below is ur excel file which contains output data also

sample.xlsx (18.1 KB)


#15

@Manjuts90
Thank u,it is working.

Suppose if i want to read data in I column and L column(L column contains four different values) and write into excel file.

Is there any changes to be made on the code given by you.


#16

@Manjuts90

Hi,
This is how my sample file looks like.
i want to read data in I column and L column(L column contains four different values) and write into excel file as different columns.

please help me with it.sample1.xlsx (18.5 KB)


#17

@Manjuts90
Hi Manju Natha,

 Please help me with that.

#18

@krishna124 Below file will be helpful for u.

sample-----.xaml (16.4 KB)

output excel file

sample1.xlsx (24.2 KB)


#19

@Manjuts90 Thank u

If the excel file is as follows,is it possible to read and write data into another excel.
I only need the data to write into excel that is highlighted in red color.
It has to be done dynamically.
Is it possible to identify the data by using names.sample2.xlsx (18.8 KB)


#20

@krishna124 u can copy the rows based on data, if data is common across in all required rows.

In ur example identify rows by using “ACH CREDIT” or “BNKCRD DEP WorldPay” etc. Since all coloured values has these values.

If coloured values will different or same, If rest of the values have common word other than colored rows then also u can extract required rows.

In your example both are possible