Agreed on TNG cast getting along the best.
TOS probably the worst?
From various interviews, it seems the DS9 cast were not all that close (though there were some close relationships amongst that)m but never "didn't get along", merely were just professional to each other and never really moved beyond that into friendship etc. There was an interview with Armin Shimmerman who highlighted this with regards to "Mr. Brooks".
Dave Rossi, back in the Star Trek Monthly magazine circa 2006, suggested that esp. around season 2/3 time, there were some arguments amongst the cast.
Not sure about Voyager, but I understand some of the cast resented Jeri Ryan initially.