How to convert IEnumrable Object Type to Data Table or String?

datatable
excel
uiautomation
studio

#1

Hi,

I am trying to copy a column data from an excel sheet to the clipboard and paste the same data onto a work space. I have used the “Read column” function to read the respective column from excel and I saved the content to a reference variable with type “IEnumerable Object”(as it is only accepting this type).
I am unable to find a way using which I can convert this IEnumerable Object type to Data table or String so that I can paste the same in the desired work space??

Thanks in advance.


#2

Hey @sans.12

Try this: Read_Col.zip (5.7 KB)

Regards…!!
Aksh


#3

Thanks for the solution @aksh1yadav.
Is there any possibility to get the IEnumerable type into data table also??
The data getting from the excel is of IEnumerable type which I am not able to write into a data table. My problem is I need to fetch the entire column data and paste it on an SAP module.
Can it be done by any chance??

test100.xaml (14.2 KB)
Sample.xls (23.5 KB)


#4

Hi
How to get each value separately ?

BR
Aditya


#5

@sans.12

If your collection type is IEnumerable then you can convert that to DataTAble by using CopyToDataTable method.

Regards,
Mahesh


#6

Will you explain more? about your scenario?

Regards…!!
AKsh