Function to export from Perspective Table to excel

Thank you all for your responses.
All the arguments have been very helpful.