Material quantities room by room

Good morning guys,

I am trying to calculate the walls material quantities room by room, but it seems to not work with this script because I have done a double-check with the Revit schedule and there are different numbers as output. Mainly in this way, Dynamo doesn’t cut off the openings (doors and windows).

Any suggestion in how I might have the right quantities for materials room by room and floor by floor and output in excel?
Thank you for your help.