I think the easiest way is to create some formulas in a separate excel sheet that render the needed commands in the RouterOS CLI format. Then, export the sheet as text and upload to the router. After that execute /import file-name=filename.txt
The upload(fetch) and /import can be automated with a rather simple script, either from the router side or from the host side. Upload can be easy if you enable SMB share for one of the drives on RouterOS
Otherwise you will end up creating a complex script on mikrotik, but you will still get to a point that the data needs to be prepared and made available to the script via some kind of local web server.. so at the end of the day I think that preparing a command list from excel (especially if you already have the excel spreadsheet) and /import ing it in the shell is the cleanest way.
Another good point about this way is that there is no limitation on the size of the script (well, apparently there is some, but it's much bigger that the 4096 byte limit of a script variable. I have used this approach to add 15k addresses to an address list)