You can use Calibre, Hamster or similar ebook converters or management programs to convert ePuB (Open Publication) e-book files to simple text file format. This will remove any formatting and save just plain text.
For example in Calibe, Import ePub e-book to Calibre library ► select it and click on Convert books button ► select Output format as TXT → Click on OK button.