For some people, diet can be a trigger of acne breakouts. But it is by no means the cause.
What it comes down to is this. Acne is caused by bacteria. In fact the very name acne comes from the name of the bacteria "P Acnes".
If you can kill the bacteria you can stop spots/acne. One way is antibiotics. I used to suffer from acne myself, not too severe and on my face. I used bacteria and boom no spots.
Also you can use "Benzoyl Peroxide", this is available in creams and gels and basically seeps into the skin where it produces oxygen which kills the anaerobic bacteria. This also has proven very effective at giving me clear skin.
Before trying either Antibiotics or Benzoyl Peroxide I tried diets. At went for weeks at a time logging everything I ate. I tried going dairy free, I tried going wheat free, I tried going dairy and wheat free. I tried going vegetarian, I tried paleo, I tried basically every combination of diets possible. I ate so healthily it was insane. And guess what? I still got spots.
Anyone saying its "only diet" has been reading too many websites that are trying to sell diet books and promise a cure-all for all sorts of problems.
The thing is, every person is different in how diet will affect their skin. But every spot is caused by bacteria, kill the bacteria, stop the spots...