Nope, they are not interchangeable at all :)
안녕하세요 is a polite form of saying hello, you may use it when you meet your elders, or formal occasions.
감사합니다 is also a polite form of saying thank you. The usage is similar but those two are totally different.