How to get Firbase DB downloaded to Excel?

I save all our details in Firebase DB . I want to get that complete DB details in Excel or PDF sheet and get downloaded to my system with button click . How can I achieve this?