Is there a way to attach a file such as .txt or .xlsx to my question? If not then what no-cost alternatives do I have?
BTW I work at a high security national laboratory so I can not post it online here and provide a link to it.
No, it is not possible to post a file into a question, at least not directly into the SE software. It's largely because this would post a security risk -- the file could be corrupted or infected, and we'd need to include some sort of virus check for each file. This, in turn, would affect our performance. Please see this meta post for more information.
That said: you're free to link to Google Docs or some other file hosting service should you need to include a file with your question for whatever reason.