I don't know for sure without seeing your scad model, but I'm guessing you either forgot about the thickness, or you have some problems with colinear edges, etc.
Regardless, I whipped up a quick .scad that should do whatever grid size you want. Just put the sizes and the number of cells, and the wall thickness at the top, and it should generate your grid.
Things to keep in mind is that I prioritized position over hole size, so if you care about the exact hole sizes, rather than the hole spacings, you'll need to add "thickness" to your sizes, (with my current example grid, the 12x6 holes actually end up 11.5x5.5 due to the .5mm walls.)
also, keep in mind that the total size will end up 1 thickness wider and taller, so if you're printing a panel that's an exact size to fit something, you will need to make the total size smaller by "thickness" on each dimension.
-Nick