How to Copy Whole Column in Excel

Hi,

I want to copy whole column from excel store in some variable or data table without using excel application scope.
Thank you

Regards,
Mohamed Farhan

Hi @MD_Farhan1

=> Read Range Workbook
Output → dtExcelData

=> Use this in Assign activity:
columnData = dtExcelData.AsEnumerable().Select(Function(row) row(0)).ToList()

*columnData is of DataType System.Collections.Generic.List(System.String)

Change the index number according to your column 0 represents first column. Change according to that.

Hope it helps!!

@MD_Farhan1

check the workbook activitys its not required any scope

Hi,
System.Collections.Generic.List(System.String)

above Datatype not showing.

Hi @MD_Farhan1

Click on Browse for Types and type this it will show the datatype.


Regards

I Got Error.

Regards,

Hi @MD_Farhan1

Try giving it as List(Object).

Regards

not replace the value only data type. i want all column value .

Thank You

Regards,

Hi @MD_Farhan1

In Replace with wite this way:
String.Join(vbcrlf, columnData)

Regards

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.