Row data extract

Hi Team,

I want to extract only the column values under Ref Number

Expected out should be
R1234567890
SAR987
IND123412
DL789689
A56789012345
X12345678902222

I have just shared the sample screenshot in an excel, exact rows we are reading from mainframe using ellapi. I am reading each rows using loop since the first column contains names with different length got struck in reading the specific ref number.

Thanks for your inputs

Hi @Robotics

  • Use Read Range Activity (Create the Output DataTable)
  • Use Filter DataTable Activity
  • Use Write Range Activity

image

Regards
Gokul

Hi,

Which type output do you need?

For example,
string (separated by linebreak)

String.Join(vbCrLf,dt.AsEnumerable.Select(Function(r) r("REF NO").ToString))

String array

dt.AsEnumerable.Select(Function(r) r("REF NO").ToString).ToArray

Regards,

1 Like

I have just shared the sample screenshot in an excel, exact rows we are reading from mainframe using ellapi. I am reading each rows using loop since the first column contains names with different length got struck in reading the specific ref number

@Robotics

  1. Use Read Range activity to read the Data from Excel file and it will give output as DataTable. Let’s say InputDT.

  2. And then try below expression to get all REF No. from it.

        RefDT = InputDT.DefaultView.ToTable(False,"REF NO")
    

Here, RefDT variable is of type DataTable.