# How to reduce number of decimal Mathematica outputs in excel

I have a code which returns numbers with 20 decimals, when I copy them and paste in excel I can't reduce number of decimals, Is there any special way or trick to copy and paste so that I can reduce number of decimals?

Perhaps you can use this approach.

datum = N[Pi, 20]


3.1415926535897932385

excelNum = Round[datum, 10^-8] // N;
excelNum // FullForm


3.14159265

• Many thanks, however I knew how to reduce number of decimals using Mathematica code but I wanted to do so without it. – Wisdom Jan 1 at 6:59
• @Wisdom. I am not a Mathematica guru, so somebody might post an answer proving me wrong, but I don't think it can be done without running some code on the selected data. You could make pallete with a button that runs a script to apply the code to selected data to make the digit reduction more convenient. – m_goldberg Jan 1 at 7:28
• @Wisdom - If you want to automatically Round all real numbers in output use $Post = # /. x_Real :> Round[x, 10.^-8] & Then use $Post=.` to return to normal. But then, why not do this in Excel? You can automate with a VBA macro. – Bob Hanlon Jan 1 at 18:43