Data Table Select Option

excel

#1

cdr.Select(“Client =”+"’"+serverName+"’"+"").CopyToDataTable

I have tried looking for solutions but this error is still there. It does not work.

I referred to this


#2

@sangasangasanga

cdr.Select(“Client =’”+serverName+"’).CopyToDataTable

will this work for u?


#3

@Manjuts90
I tried it.
cdr.Select(“Client =’”+serverName+"’").CopyToDataTable
It doesn’t work


#4

@sangasangasanga Any error u getting?

Can i know your requirement?


#5

It works but there are extra spaces in the top


#6

@sangasangasanga Those extra spaces are somewhere in ur workflow. U check the workflow or Can u share ur workflow?


#7

a class=“attachment” href="/uploads/uipath/original/3X/4/7/471f81792e716d5700e5a52e56b7905291c30241.xaml">CloneMain.xaml (111.5 KB)


#8

@sangasangasanga Try below workflow i have made changes.

CloneMain.xaml (111.6 KB)


#9

Now there are no spaces but it keeps looping


#10

@sangasangasanga try below workflow and let me know.

CloneMain.xaml (112.3 KB)


#11

It gives this error.
CloneMain (1) has thrown an exception

Source: For each row

Message: Collection was modified; enumeration operation might not execute.

Exception Type: InvalidOperationException

System.InvalidOperationException: Collection was modified; enumeration operation might not execute.
at System.Data.RBTree1.RBTreeEnumerator.MoveNext() at UiPath.Core.Activities.ForEach1.InternalExecute(NativeActivityContext context, IEnumerator valueEnumerator)
at UiPath.Core.Activities.ForEach`1.GetStateAndExecute(NativeActivityContext context, ActivityInstance completedInstance)
at System.Activities.Runtime.ActivityCompletionCallbackWrapper.Invoke(NativeActivityContext context, ActivityInstance completedInstance)
at System.Activities.Runtime.CompletionCallbackWrapper.CompletionWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)


#12

@sangasangasanga try below one, i think this will work correctly.

CloneMain.xaml (113.0 KB)


#13

@Manjuts90 Hi now there are no spaces but it loops twice. Any idea why?


#14

@sangasangasanga above file getting loops data twice?


#15

@Manjuts90 yes


#16

@sangasangasanga try below workflow and let me know.

CloneMain.xaml (113.6 KB)


#17

@Manjuts90 Hi, may I know what are the changes you are doing? As i see the workflow, looks the same but the output differs.


#18

@sangasangasanga i have changed the position of clear datatable and also cleared first row in build datatable acitivity due to this ur getting empty spaces in excel file.