Why didn't Jim just tell the office that Dwight was the one who created the "anonymous" spreadsheet of employee rankings?
That's a good question. He could have also said that he didn't authorize any money collection. Also, if he wanted to, he could have traced how the cake was paid for. However, I've noticed that Jim tends to get flustered when things go haywire and his usual quick-thinking is become impaired.
I really wanted to see Dwight get his comeuppance and was disappointed that the story ended with a deus ex machina.
Also, I am very, very confused at why Ryan hates Jim so much. What did Jim ever do to Ryan. I know about the whole sticking him in a closet thing, but Ryan has had it in for Jim since Season 4. Why? I don't get it. Is it because Pam turned him down once?