Hi everyone,
I need to copy Column B & Column F or need to delete all the columns except the Column B & Column F from the excel.
Note: Copy/Paste range is taking more time.
Sample.xlsx (8.9 KB)
Could you help me to solve this?
Regards
Gokul
Hi everyone,
I need to copy Column B & Column F or need to delete all the columns except the Column B & Column F from the excel.
Note: Copy/Paste range is taking more time.
Sample.xlsx (8.9 KB)
Could you help me to solve this?
Regards
Gokul
@lakshman @Palaniyappan @NIVED_NAMBIAR @postwick @prasath_S @ppr
Can anybody help?
Try below steps.
First use Read Range activity to read the entire file and it will give output as DataTable. Let’s say ‘InputDT’.
And then use multiple Delete Range activities to delete the data and pass Range as below.
"A2:A"+(InputDT.Rows.Count+1).ToString
"C2:E"+(InputDT.Rows.Count+1).ToString
"G2:Z"+(InputDT.Rows.Count+1).ToString
Note: Replace Z with end column.
Hi @lakshman
Regards
Gokul
You can also try with Filter Datatable
Use Read range to read excel into Datatable
Later use Filter Datatable and in the outputColumns keep and use only required column names
This will remove remaining columns
Hope this may help you
Thanks
I will look into it
Can you check what column names you are getting using output Datatable activity?
and use those column Names
Hope this may help you
Thanks
Sorry I thought till F only. Take one more Delete Range activity and pass range as “G2”.
I will check it and come back
Sure @Gokul001
Do you know end column ? If yes then specify as below.
"G2:Z"+(InputDT.Rows.Count+1).ToString
Note: Replace Z with end column.
Hi,
Can you try to use DeleteRange and Insert/Delete Columns as the following?
Range property of DeleteRange will be
"G1:"+Uipath.Excel.Helpers.ExcelUtilities.ConvertColumnIndexToColumnLetter(dt.Columns.Count)+dt.Rows.Count.ToString
Change mode of Insert/Delete activity should be Remove.
Regards,
Hi @Gokul001
Try this approach
Read the excel and store in dt1
Then use
dt2= dt1.DefaultView.ToTable(False,{“Column B”,“ColumnF”})
Hope this helps you
Regards
Nived N
Dear Gokul,
You can look into the attached xaml for your requirement.
The xaml copies Column B and F and writes it into sheet2
ForumDivisionQuery.xaml (7.2 KB)
Thanks,
Geetishree Rao
Thank You @Yoichi @Palaniyappan @geetishree.rao @NIVED_NAMBIAR @Srini84
@lakshman It’s Working for me.
Happy automation
Regards
Gokul
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.