Force wget to use actual filename
wget --content-disposition 'http://spreadsheets.google.com/pub?key=pyj6tScZqmEfbZyl0qjbiRQ&output=xls'
will do the trick for you.
Its still not fully implemented and seems to bug out a bit sometimes so its not the default option in wget
, use it at your own risk.
You can try to use curl to download and keep original filename:
curl -OJL ${your_url}
- -O for remote-name
- -J for remote-header-name
- -L for location
see curl command line options.