Yes onions have a LOT to do with the smell of your sweat.
Don't you know food alters the smell/taste of ALL your secretions. That's because your biggest excretory organ isn't your kidney, it's your SKIN. So smelly stuff in, smelly stuff out
BAD foods: onions, garlic, curry spices, asparagus, cabbage, too much red meat, too much processed junk, too much cheese, beer
GOOD foods: pineapple, fruit, vegetables
Secondly, do shave, or at least trim - hair isn't dirty, but it does trap in smells and keeps them there.
Thirdly, dress in layers, so you can always adjust the level of clothing with ease, so you don't sweat so much.
Fourth - do use talcum powder, and possibly bring with you/have at work a change of shirts. Use natural materials (think cotton) and avoid artificial ones - those produce the funkiest smells ever. Make sure your clothes are washed properly, I've noticed that some fabrics trap in smells so even if you're not sweating into them, they re-activate some previous smell that's been embedded in the fabric. If you can't cure it, deal with it efficiently. Don't walk so briskly that when you stop, you end up sweating from the exertion. Don't drink water really fast.
LOL, I personally don't sweat excessively, but I have a super-sensitive nose, and I've noticed more stuff then I wished for

.