How can i copy only the numbers,

image

  1. read range to read table to datatable variable
  2. the below line will assign the numbers column to a list of integers

dt.AsEnumerable.Select(function(x) x.Field(of Integer)("Number").ToList

Hi @Manju_Reddy_Kanughula

If I understand correctly you want all the numbers to be read for that you can use read range activity and it will give you the numbers column if you give range as “B:B”

Please be more specific about what you need if this does not work

cheers

HI @Manju_Reddy_Kanughula

Before going to the steps, Can you tell what you need t from the excel file?

Use Read range activity

Use For each row in Data Table

Use Regex Expression

System.Text.RegularExpressions.Regex.Match(Currentrow("Number").Tostring,"\d+").Tostring

image

Regards
Gokul

HI @Manju_Reddy_Kanughula

If you need only the number column in the input, So you can try with Filter Data table activity → Select the Output Columns

Check out this XAML file for your Reference

FilterColumn.xaml (5.7 KB)

Regards
Gokul

@Manju_Reddy_Kanughula
You can use read range activity with range “B:B” and store the output as a DataTable
image

All three number at a time i need copy then i have to paste them in SAP application.

I have to copy all three numbers at once, then I have to paste them into the SAP application.

Hi @Manju_Reddy_Kanughula

Check out this thread

Regards
Gokul

Hi @Manju_Reddy_Kanughula ,

After read range(Check the box to read header) use this in assign to concatenate all three values

String.Join(“,”,dt.AsEnumerable.Select(Function(row) row(“Number”).ToString))

this will concat all the values together into one string

cheers

HI @Manju_Reddy_Kanughula

How about this expression

ListVal  | Variable type: List(Of String)

ListVal = DtInput.AsEnumerable.Select(Function (row) row.Field(Of String)("Number")).toList

You can use String.Join method

String.Join(" ",ListVal.ToArray)

Check out the XAML file

FilterColumn.xaml (7.6 KB)

image

Regards
Gokul

1 Like

@Manju_Reddy_Kanughula
Try this

String.Join(",",YourDT.AsEnumerable().Select(Function (a) a.Field(of string)(1).ToString).ToArray())
or
String.Join(",",YourDT.AsEnumerable().Select(Function (a) a.Field(of string)("Number").ToString).ToArray())

Note: "," is a seperator, You can use desired separator(./-_*&) or space" "

If need to set it in a clipboard,
Use Set To Clipboard activity and can paste in desired location
image