Basically.. Any file that you "execute" instead of read can have a virus.
So Txt files are fine, but pdfs, spreadsheets, word docs, etc can all have various types of virus. Most will ask you to enable macros or download something to read it/convert it - but don't be fooled.. You rarely need a...