How to insert multiple line of CSV file to textbox quickly

Hello guys, now I’m having a task working with checking DA of multiple websites.
I’m using this website: https://domchimp.com/tools/moz-bulk-da-pa-checker
So question here is that I need type 100 lines one-time to textbox from my CSV file.
How can I do that?

You must use csvread it’s simple and easy

https://ui.vision/rpa/docs/selenium-ide/csvread

i know how to use csvRead but I want to type 100 line at the same time, loop 100 times is too long

Yes you can do it, you can use !csvreadlinenumber command to switch in every csv line

https://ui.vision/rpa/docs#!csvreadlinenumber

Or you can use the new command csvReadArray

https://ui.vision/rpa/docs/selenium-ide/csvread#array

You can do all without any problem with ui vision.

Then the new csvReadArray command that @newuserkantu mentioned is perfect for you. It reads the whole CSV data into an array ${myCSV[row][column]}.

Then you can simply use 100 TYPE (etc) commands in your macro:

  • Type | xpath=line1… | ${myCSV[0][0]}
  • Type | xpath=line2 | ${myCSV[1][0]}
  • Type | xpath=line99… | ${myCSV[99][0]}

Wait, I just see that the website https://domchimp.com/tools/moz-bulk-da-pa-checker uses one big textbox for all data, separated by newline!

Then you need just one TYPE plus \n:
Type | xpath=line1… | ${myCSV[0][0]}\n${myCSV[1][0]}\n...${myCSV[99][0]}

or

Sendkeys| xpath=line1… | ${myCSV[0][0]}${KEY_ENTER}${myCSV[1][0]}${KEY_ENTER}...${myCSV[99][0]}

1 Like

Hi, is it possible to do something like:
Type | line=1 | ${myCSV[0:100][0]}

I tried something like this in my script but it didn’t work.

How do you use the output of the csvReadArray without needing a loop?

The serious solution is have a better csv it is crazy having a similar csv, create a new csv and merge all lines in 1 row of csv, ui vision can not solve the bad csv of users.

Before automate you must study the structure of csv and macro otherwise you lost time and you will have a bad work.

1 Like

@newuserkantu Agreed. Not to sidestep your advice, however I am looking to do something similar. :slight_smile:

@ulrich
Please could you advise?
Would be useful to know how to get this output in the tool as a variable:
${myCSV[0][0]}${KEY_ENTER}${myCSV[1][0]}${KEY_ENTER}...${myCSV[99][0]}
or
${myCSV[0][0]}\n${myCSV[1][0]}\n...${myCSV[99][0]}

So we can send a command like this, which has been recommended above.
Sendkeys| xpath=line1… | ${myCSV[0][0]}${KEY_ENTER}${myCSV[1][0]}${KEY_ENTER}...${myCSV[99][0]}

Fairly new programmers, and so the concept is basic but new to us.

In the link below, I have attempted something like:
store | | VarList
executeScript_Sandbox | return (${VarList})+${row[${RowCounter}][${ColCounter}]} | VarList

Initially this worked, however on moving to CsvReadArray, I have received some errors. The script has stopped feeding in the correct values or recognising the row array as a declared variable

Link: How to append a column as comma separated variable? Currently get undefined error