Since I'm attempting download of entire Team Drive, the log is massive. I tried to bend the command to download just a single file but ran out of time. I may loop around with some more tries and get you a log to review.
Windows shows them as filename.gsheet or whatever format they are originally. I expected him to arrive as filename.xlsx per documentation. Have I misunderstood?
Interesting. Even your listing of the directory (LS) shows the file as xlsx when you created it as a gsheet. I believe mine would show the file as x.gsheet. Trying to reproduce.
As for the export_formats directive. Mine was originally blank also because that's the default. When export as XLSX didn't work I edited the config to add it incase that was the issue.
I found something interesting.
I created a Shared drive called xxtest and a file "Ducks Fly in Formation" as a Gsheet.
If I run this:
rclone --drive-team-drive "0AFUW00000000Uk9PVA" ls gdrives:
-1 Ducks Fly in Formation.xlsx
However if I run this I get no results.
rclone --drive-team-drive "0AFUW00000000Uk9PVA" ls gdrives: --include "{*.gsheet,*.gdoc,*.gslides,*.gdraw,*.gtable,*.gform}"
My assumption is that rclone is on the fly interpreting the *.gsheet as XLSX meaning when I filter to include the Google Native formats I actually get nothing. However, I guarantee you I downloaded something with the gsheet extension previously with this:
i think the docs are clear
"Note that rclone adds the extension to the google doc, so if it is called My Spreadsheet on google docs, it will be exported as My Spreadsheet.xlsx or My Spreadsheet.pdf etc"
"When rclone downloads a Google doc it chooses a format to download depending upon the --drive-export-formats setting"
rclone.exe ls gdrive-a1b2:x
8588678 x.log
-1 x.xlsx
rclone.exe copy gdrive-a1b2:x C:\ex\x -vv --include=*.xlsx
2020/10/02 15:27:07 DEBUG : rclone: Version "v1.53.0" starting with parameters ["c:\\data\\rclone\\scripts\\rclone.exe" "copy" "gdrive-a1b2:x" "C:\\ex\\x" "-vv" "--include=*.xlsx"]
2020/10/02 15:27:07 DEBUG : x.log: Excluded
2020/10/02 15:27:09 DEBUG : x.xlsx: MD5 = 9359b28c6665db9616ddf7a1707917a6 OK
2020/10/02 15:27:09 INFO : x.xlsx: Copied (new)
2020/10/02 15:27:09 DEBUG : x.xlsx: Updating size of doc after download to 4679
2020/10/02 15:27:09 INFO : x.xlsx: Copied (Rcat, new)
2020/10/02 15:27:09 INFO :
Transferred: 9.139k / 9.139 kBytes, 100%, 6.653 kBytes/s, ETA 0s
Transferred: 3 / 3, 100%
Elapsed time: 2.0s
then once the file is local, i can open it with excel.
but rclone claims to have transferred three files, so something is going on behind the scenes.
if you try to download such a file from gdrive website, gdrive auto-converts it to .xslx and then downloads the file.
Hmm. I'm looping through ~260 Google Shared Drives attempting to fetch all the Google formated stuff. I really can't use exclude filtering I think. What you've shown implies that Gsheet documents really don't have an extension since they are just pointers. Would this work to get extensionless files?
rclone copy gdrives: $destination --exclude *.*
I think that might give me more than just Gsheet, Gdocs, and Gslides but maybe I'm ok with a little mess if I can get the files.
That didn't work. It excluded all files.
I tried the reverse as well
--include *.xlsx
I get the Gsheet and real XLSX files.
Because rclone wants to allow you to download as the format you specifiy, it obscures the actual file type from you. I wonder if I can set the format to something I know I don't actually have like Open Office, search for only those but tell the copy command to get them as Microsoft format.
That's a thought. I get a shortcut with the URL to the file. Any idea how to tell just from this shortcut format which ones are gsheet vs gdoc vs gslides vs etc...?
in my testing, i found --drive-export-formats=desktop to be the easiest to parse.
it is in a .ini format and i already use that format with my python script i use to control rclone.
in the example below,
the name of the google document is Name=x
the type of document is from the url spreadsheets, document, presentation and so on