How do I export XYZ loc data as a series of numbers in a text file?

Hello!

I have a ball bouncing around. Every frame is a keyframe. Please could someone show me how do I export the XYZ location (rotation and scale is not necessary) as a long list of numbers in a text file.

Thanks!

PS. To Moderators; I posted this in Tech Support forum but think this might be better place for it. Please delete as appropriate, thanks.