This question already has an answer here:
- Force emacs to use dumb indentation 2 answers
How can I configure emacs so that when I press the the Tab key it inserts spaces?
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
To configure Emacs so that pressing Tab will produce spaces instead of actual tab characters:
From this page.