Read excel sheet data by index number or any other way?

Hi Guys,
Need Help.

I have excel file attached here for reference[Template.xlsx|attachment]
Template.xlsx (11.2 KB)

This is my main sheet
image

I have created sequences as per other sheet e.g. prashant.xaml,tushar.xaml.

Form main wrokflow is create as → if name = “Prashant” ->then ->invoke “Prashant.xaml” elseif …(validate other names)

Inside other sheets e.g Prashant,tushar,etc i am having multiple data.
e.g
image

“prashant.xaml” workflow is → used for each row ->sheet name(Prashant)-> fill data into form(should fill data by index number) same for other xaml.

main excel having names in random order.
when name =“prashant” for 1st time “prashant.xaml” should take all values for 1st row.
only selected one in above snap.image

and if getting name = “prashant” for second or 3rd time “prashant.xaml” should take values for next row.
i am not getting it how to take value from the sheet by index or else

note :- maybe my explanation is little complex :sweat_smile::sweat_smile:

please help…

@pkbharath
@Palaniyappan
@loginerror
@HareeshMR
@AshwinS2
@Pablito

Good Morning guys,

Please help me out…

I would suggest keep a count outside the name:
example:
Count= 0
If name = Prasanth
then in assign give Count = count+1
and in reading the workbook keep the range as “A”+Count.tostring:“C”+Count.tostring then you will get only one row as ouput .
Then you can save that data
then use for each row and in that read with

Fine
you mean like like this
image

and also the same for other sheets as well
Cheers @prashantP

Hi @Shanmukh08
thanks for replay.

i tried as you suggest. but not getting any by doing this.
please correct me if i did wrong.

below img is for main workflow
count = 2 (Int32) and import argument.

increment is working it count taking 2 all the time
Range = “A” +count.ToString +“:C” +count.ToString = output is
data table = DT.ToString = output is blank.

ouput img
image

Hi @Palaniyappan
thanks.

this is just an example. there is numbers of sheets this way not possible.

is there any other view to passing index or else ??

@pkbharath
@Palaniyappan
@loginerror
@HareeshMR
@AshwinS2
@Pablito
@Shanmukh08

does LiNQ query will work here …?

please tell how to apply

Thanks

Hi @prashantP

Have a try in this

(From a In Datatable.AsEnumerable where(a (“Names”)) <>‘’ select a).CopyToDataTable

Check this

Thanks
Ashwin S

Hi @AshwinS2
I am not getting it.

please correct me ?

or can you crate workflow for same ? if

@Petar_Soce @Robert_Carlisle @samir
Hi guys…

Please check if you can help me out ?

You can create a variable with the sheet name like

if it is a, then the variable will be a, and get the value from the first row assigning value of a = 1, then increment the value by 1 for each iteration or occurance, then pick the value using the variable ‘a’ using it as index