Hello, I am having problem to finding all the row value of A in Excel and place into another Excel sheet… Anyone please Help me to solve this problem …
Can you please elaborate it ?
I would like to know how to retrieve the row using the value and column field.
For E.g, 1st row has the value ‘A’ and ‘WO’ with different column names(1F,2st,3S).
I want to iterate each row and column if the given value ‘A’ exist then I need to get the columns accordingly which has the value ‘A’.
Now I need the row with the value ‘A’ and column (1F,4M,5T,6W,7Th and so on) and write it in new sheet.
Can you try this.
Read the data into the datatable.
rowIndex =(dt.Rows.IndexOf(dt.AsEnumerable().Where(Function(row) String.Join("", row.ItemArray()).ToString.Contains(“A”)).ToArray()(0))+1).ToString
I have Tried your query but it’s not working… This is my Excel file. please check and let me know.
MainFile.xlsx (11.8 KB)
I have checked your file. But my actual requirement is,
- loop will go for 1st row, check whether row Value is “A” . and get that row cell and column Name paste into new Sheet.
Can you please check this.
MainFile.xlsx (12.7 KB)