Hey Booker,
I'll have to get back to you on some examples of how to use New-GDriveFileObj, I'm not in a spot where I can test and verify that at the moment. So on to the next bit...
So from my understanding of things, this wouldn't be the way to go about things. The
Google Drive v3 API will allow you to do things like download and upload entire files, but not get parts of the file or update lines therein. To do that, you'd need to look in to using the
Google Apps Script which
does let you interact with the spreadsheet.
Thing is, Google Apps Script is like writing a VB script for an Excel macro - it works within the browser and within the sheet. I don't have a ton of experience with it, but I have written a few to do some extensions for spreadsheets.
So, can you then take Google Apps Script (Javascript) and somehow interact with it via PoSh? Well... it gets even more hairy. They do provide an
Apps Script API to '
remotely execute a specified Apps Script function' which is itself also a REST API, and they also offer a C# example in the
API request examples section which I think would rely on the
Google Apis Script v1 client library. I have gone no further than that, however I do think that's the appropriate direction to go.
To get started right now you'd have to figure out a way to convert the client library in to PoSh cmdlets, or to do it in a way that it would work with gShell.
OR
As per a previous thread I'm currently working on a way to automate the conversion of any and all C# google client libraries in to a gShell module. Depending on your timeline, I'd be happy to make this one of the ones I look in to first.
Also note: I see from a quick search there is also a
Sheets v4 API but the release notes are old and their documentation is limited. Again, once I have been able to generate the PoSh module around it I'll have a better idea of what it can and can't do.
I'll be back with examples hopefully later today.
Regards,
Spencer