Hard coding spaces and tabs - can it be undone?

I have written my book. However I have hard coded spaces and tabs into my paragraph because I was unaware I could change the editor and have it automatically done for me.

Is it to late to undo this? Put my text into the automatic edited formatting?

The spaces may take a little more work (you could try to convert them to tabs using the Edit ▸ Find ▸ Project Replace... command), but check out the Edit ▸ Text Tidying ▸ Strip Leading Tabs menu command, which can be used to clean up things on a per-document basis.

For both procedures, I would strongly recommend using the File ▸ Back Up ▸ Back Up To... menu command first, as project replace in particular can be destructive if you get the settings wrong at first.