Hi Team,
I have 1 excel which having columns like S/N, Name, Product name Prod1 etc.(attached screenshot)
How to access particular column(Product Name product 1) which is splited to next line in cell?
Have you tried with “Get Cell” Activity?
If you know its position, you can use the index value:
so Table.Rows(0).Item(2)
1.) use get cell activity Or
2.)if you know row index use syntax like datatable_varile[row_index][column_name]
please tell me know exact requirement so that we can help out me clearly
Try to print the value of that cell by giving row and column index. See the output then we can take decision accordingly.
Thanks,
AK
I can’t use index as i have 40 columns from that i have to select 10 and in future if any column deleted then it will affect other column’s index
For “Get Cell” Activity you want to install Package “Uipath.Excel.Activities”
@kalyanDev
I have excel which has column name(Product Name product 1) splited in 2 line (attached screenshot)
I wanted to access that column using column name in for each row. I can’t use index as in future column position may change.
So please provide me solution to access column name which has 2 lines in single cell?
Hi @Komal_Mehetre - I think you read the header row, then format accordingly for BOT readable format and re-write the header row again into the excel sheet. And then you can start your actual process.
Thanks,
AK
One way to do it is to locate the index of the column,
You can use a For Each loop of all of the columns
Then within that use an if statement to find the colum name that contains your string header (Product Name product 1) THEN
set the column index by assigning an interger to item.Ordinal.
You would then access it via the solution i previously suggested.
row(“Product Name”+vblf+“product 1”).ToString
try this
Welcome!!!
can u please mark it as solution