Not sure if this is a one-time need or maybe you are seeking for a way to automate this; if it needs to be the script way, check for the CSV having suitable end of line characters, where is it failing?
If this is a one time need: a hack or workaround without resorting to scripting would be opening that csv file on a text editor then using find/replace to put
/ip firewall address-list add address=
by searching for the beggining of line, so that text is placed before the IP, and then
list=YOURLIST
by searching for end of line.
Another way would be by using a text editor with block or column mode editing capabilities, like SublimeText or notepad++ for example (see
https://notepad-plus-plus.org/features/ ... iting.html).
Both by the way have plugins for ROS syntax coloring.
The idea is to end with the CLI commands on the text file; that way you can rename it to .rsc, upload it to the router then do an import on the .rsc.
Following this idea, and as you may be reaching maximum file size for file processing using scripting, you could also generate the .rsc file containing all the CLI to fill the list by coding an smal cgi in bash or php, then just fetching the file from your web server...