or, without any plugin, you can create the rectangle, group the upper face (select it from top left hand corner while beeing in parallel side view, just like srx's gif), select all then "instersect with selection", select all again and double click on the surface you want to keep holding shift and press delete. πŸ˜„ (you can then explode the group - optional)

not that long even if it seems so πŸ˜„ !

and beware, some of your small circles appear not to be at the same height than the others