Hi,
I am unable to copy only the values present in the 1st column “A” of the Excel file to a Website. I have used couple of activities to copy the values but is copying all the values (50124 ABC 50124|ABC) in the Excel file.
Excel values:
Value (Column A) to copy (excluding header):
Activities used:
@Karunamurthy
Please try this
This will join all the values with comma and make it a string
Requiredstring = String.Join(",",Dt.AsEnumerable.Select(function(x) x("Member ID#").ToString))
You can change "," to Environment.NewLine
","
Environment.NewLine
Cheers
Hello @Karunamurthy
Use Excel Application Scope (to open the Excel file) WorkbookPath: “PathToYourExcelFile.xlsx”
Read Range (to read values from Column A, excluding the header)
SheetName: “YourSheetName”, Range: “A2:A100”, // Adjust the range as per your data (excluding the header) DataTable: dtValues
Assign valuesToCopy = String.Join(Environment.NewLine, dtValues.AsEnumerable().Select(Function(row) row(0).ToString()))
Use Web Automation activities to navigate to the website and paste the values (valuesToCopy) into the desired field on the website.
Close Excel Application Scope
Thanks & Cheers!!!
Hi @Karunamurthy,
dt - this replace with your datatable variable which take whole data from the sheet.
String.Join(",",dt.AsEnumerable().Select(Function(row) row.Field(Of String)("Member ID#")).ToList().ToArray)