Hi all,
I am getting data from excel sheet (3 Columns), I just need to validate 1 column in that excel sheet could you tell me how can i get the 1st column seperatly by using readexcelsheet() function
Discussion posts and replies are publicly visible
Hi Nikkheel,
Use readexcelsheet(cons!SD_DOC_SampleExcel /* document id */,0,0,2/*which column you need to fetch*/).result.values[2/*which column you need to fetch*/]
readexcelsheet(cons!SD_DOC_SampleExcel,0,0,2).result.values[2] => will give you list of string of that perticular column.
this is returning row
Yes, it will return perticular column of data. So that you will be having column 2 data. now you can validate the column 2 as per your buisness rules.
I don't believe this is correct - when I tried it, I verified that it returns data for a row and not for a column, just like @nikkheel said. The method I posted below should work for pulling from a specific column.
oh okay. When I tried I got perticular column 2 when I indexed 2 in readexcelsheet(cons!SD_DOC_SampleExcel,0,0,2).result.values[2]. First readexcel result giving 2 columns, later index of value is giving 2nd column details. Below code will also work, as it is pulling perticular column in a forloop.
readexcelsheet(cons!SD_DOC_SampleExcel,0,0,2).result.values[2] this only work for 1 row data in excel