Adding material and transferring it to the required material library

Hello experts.

I have a Dynamo script that adds new materials from an excel (xls) file. The script works great. But I have more than 150 thousand materials and when I open the materials library the system freezes. I would like to improve the script so that when adding these materials, the materials will be saved in a separate library. For example, in the first excel sheet I will have glass materials. In the second there is concrete, in the third there are bricks and so on.

Maybe someone knows a solution to this problem?
I am attaching the script file and for example xls file.
Add materials from Excel.dyn (60.3 KB)
Add materials.xlsx (10.8 KB)