Read Range for Selected columns only in Excel workbook

Hi,

I have 5 columns in my workbook(A, B, C , D and E) .I want to use read range and read only column A and D and not the rest of the columns. Please let me know how can i do it in the read range activity.

Thanks !

hi @Purnima_Sambasivan,

Read Range you can specify the range , but we cannot skip the in between columns. we can read A:D.

In you case , if you wanr only A and D.

  1. Read the Complete sheet in Datable say DtInput
  2. now we have 2 Options - Either we use Filter DataTable and FilterOut only 2 Columns in a New DataTable as shown below

image

or ,
we Delete the extra columns from the DtInput - using Remove Column and specifying the column number.

–
Mukesh

Thank you Mukesh. I was hoping we could do this through read range itself.

Read Range we have to Specify Range .

we can achieve the same with 2 Read Range :slightly_smiling_face:

1 Read Range to Read Column A - we Specify Range as β€œA1:A10” and other for D as β€œD1: D10”.

then we combine the 2 datatable - assuming we want a single Datatable as output.

–
Mukesh

wow! thats another way. Then use join table ? wonder which is the best /efficient way

1 Like

Now that’s depend on the developer choice … If you want to know the efficient way , you can always have a small poc code and run … and compare the efficiency.

–
Mukesh