When I copy excel to txt, the I can't get the delimiter for different columns as space, ' ' and the delimiter for different rows as '\n'. Is there someway for me achieve that? Because I am building a c++ program to read from such txt file.... Thank you.
Rather than using just copying the content from Excel and pasting into a text document, you should use the builtin "Export" functionality in Excel. That way you can ensure the delimiter and EOL as you want.
You need to act by using "Save as" of File menu. Details can be found here: https://support.office.com/en-za/article/Import-or-export-text-txt-or-csv-files-5250ac4c-663c-47ce-937b-339e391393ba#bmexport