Excel spreadsheet to form

I need to get values from an excel spreadsheet from columns, the values from each row needs to be pasted in a form. I have tried lists, but the the first two rows are empty( and cannot be altered) . so I am not able to use lists. Can anyone suggest a better option?

@pavithra_murwp You can use filter and skip the first two elements in the list variable.

2 Likes

what if I don’t know the specific element number which is empty ?? Means here we can filter from 3-10. But if I don’t know the index of the empty element but I need to iterate for the whole list to get the index value

@kaushik_bhowmi try using the If-Else condition in this case:
if the cell is not empty - perform the actions

I have to copy from one excel sheet and paste it by using index of the elements in another excel sheet. But if in the row that I copied contains any empty cell in between, then while pasting in another cell, the index value of the elements changes and my required value is not pasted. Suppose I want to paste the 5th element but my 4th element is empty. so while giving the index number as 5, its printing the 6th value of the list. I don’t know which element of my which parent list is empty, so can’t hard-code the value either.

@kaushik_bhowmi it shouldn’t matter if the element is empty or not, if you specify the index 5, the bot always has to print the 5th element, even if the 4th one or any other are empty.
could you provide more details of how you paste the values from one file to the other? Maybe, you could share your recording or scheenshots of it?

Dear All,

How to paste values in excel based on a condition i.e., paste values in the cell only if first column has values in it. I tried getting the first column to a list variable and checked using if condition but i’m not able to make it… Kindly provide a solution.

@Arthi Try this solution
paste-excel.zip (824 Bytes)

@ashapkina
In the solution the cell value is increased in both (if condition and also in else condition). I don’t understand why its done because If the column is empty the loop needs to be terminated but else also increase the cell value. Kindly help me understand the logic.

It was just an example of how you can use an if condition. The details depend on your use case.
This sample recording, for example, checks if there are any values in the column at all, and, if there are, pastes values from a List variable in Excel

paste-excel2.zip (781 Bytes)

Hi @ashapkina

when i use the above logic to paste values into excel the values get pasted in cell where its empty in first column too (based on condition only if first column has data, the corresponding data needs to be pasted). In my case the values start from B2. I have only 3 values in Column1 but the values are pasted till B12. Kindly help me find out the error.

Try using the first example I sent you, but delete the action from Else block.

@ashapkina

I’m using the first example deleting the Else block even then the value are pasted in next two cells where column data is empty.

Even If i have no values in column one and, there are two values pasted in cell. Where did i make mistake. Kindly share your suggestion.

@Arthi please share your recording to have a look.

You need to use variable ‘num’ in the condition, not ‘column_a’

@ashapkina
I changed the variable in the loop and even now, I’m getting values pasted in the cells where column data is empty.

Hi @ashapkina
The value from result table (had a space in the next row, i copied values from another excel) and so i’m getting data in next cell too.
Thanks for the help :slight_smile:

1 Like

Hi,
If the value to paste list has few items compared to the column_a then how to paste values in the cell by repeating the values from value to paste list as long as column_a has data in it. Kindly help figure out this i’m stuck in the process.