I'll give you a completely different way or doing this. This is the API reference and it contains a command line curl example to update the ACL.
https://dashboard.meraki.com/api_docs#update-the-access-control-lists-for-a-ms-network
Create your curl command as one line. Start up excel. Put the bit of the command up to the network ID in the first cell, the network ID in the second cell and the rest of the curl command in the third cell.
In the fourth cell "add" the prior three prior cells together to form one command.
Now replicate this row for every device, and then copy and paste in all the network IDs into the second column.
Now the fourth column has call the commands you need to run. Copy and paste this fourth cell into something like notepad. If you need to, do a global search/replace to clean up anything you didn't quite get right (formatting wise).
Then copy and past the result into a command prompt.
Your finished. No coding required.