Ultimately, I am trying duplicate & rename a Google sheet from my drive. I’m able to download/create xlsx but never Google sheet. All attempts at that have failed thus far, so I’m now pivoting my approach.
I would like save a Google sheet from my drive as a media object in my data table. From the data table, I would then name and upload the object to Google drive. But I cannot figure out how to get the Google sheet into the data table. The critical part is that I end up with a Google sheet on Google Drive. All attempts failed; seeking guidance.
I would like to create a new Google sheet. Cannot figure out to make the second parameter of create_file be a Google sheet. Have tried getting and setting bytes, converting a Google sheet to media, uploading a file from my machine (I cannot figure out how to save a Google sheet outside of Google; always converted to an xlsx), storing a Google sheet as a Google sheet in a data table, setting the 2nd parm explicitly as a Google sheet MIME type [application/vnd.google-apps.spreadsheet] …
Apologies, one more nuance to mention from the OP.
The full use case is to make a copy of the existing Google Sheet template, to which I will then write data without modifying the existing template.