-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a function to utilize Method: spreadsheets.values.append #216
Comments
Thanks for digging in, @WJurecki !! The approach that I'd want to ideally take is just to alter the functionality of |
@scrthq, I can certainly see the desire to wrap it into The only downside that I see would be breaking anyone's existing use. While I believe I'm willing to accept any solution, I just didn't want to have to keep figuring out where to add data to the end of a table and that's why I created the solution that I proposed. |
@WJurecki I appreciate the solid feedback!! I'll need to do some testing. If another function is needed, I'll likely extract the |
hey @WJurecki - I didn't forget about this, hoping to finally start testing things soon. I'll keep you updated! |
## 2.35.0 - 2019-12-29 * [Issue #216](#216) - _Thank you, [@WJurecki](https://github.com/WJurecki)!_ * Added `Add-GSSheetValues` to use the native `Append()` method instead of `BatchUpdate()` to prevent needing to calculate the last row like you do with `Export-GSSheet`. Since the input for this method has additional options and the output differs from what `Export-GSSheet` outputs, this has been moved to a unique function to prevent introducing breaking changes to `Export-GSSheet`. * [Issue #221](#221) * Added: `Invoke-GSUserOffboarding` function to wrap common offboarding tasks for ease of access management automation. * [Issue #248](#248) * Fixed `Get-GSSheetInfo` so it no longer defaults `-IncludeGridData` to `$true` if not specified in `$PSBoundParameters`. * [Issue #249](#249) * Updated private function `Resolve-Email` with new `IsGroup` switch, then cleaned up all `*-GSGroup*` functions to use it so that Group ID's are respected based on RegEx match. * [Issue #252](#252) * Added: `Archived` parameter to `Update-GSUser` to enable setting of Archived User licenses. * Miscellaneous * Swapped instances of `Get-StoragePath` for `Get-ConfigurationPath` in `Import-SpecificConfiguration` and `Set-PSGSuiteConfig` to avoid alias related issues with PowerShell 4.0
Alrighty, did some digging after testing a bit and cleaned up the function you provided so it would pass the CI tests (wasn't much needed, thank you for that!). |
I would like to be able to use the google API Method: spreadsheets.values.append to add rows to an existing table in a google sheet
Create a function
Add-GSSheetValues
I attempted to use the existing
Export-GSSheet
but this requires me to determine and specify the exact range where the new values will be inserted. Using the google API Method: spreadsheets.values.append an entire sheet can be specified in the range and the API "finds" the end of an existing table and places the appended data in appropriate rows.Either I have entirely missed how to add rows to the end of a table or this capability is not currently existing in PSGSuite.
I have taken the liberty to copy and modify the code for
Export-GSSheet
to create a new functionAdd-GSSheetValues
and have tested it for my limited use case.Please note that I used the API Enums rather than ValidateSet so options my be slightly different from the rest of PSGSuite. Obviously make these however you see fit and I will adapt to your released version (assuming you accept my Feature request.)
The text was updated successfully, but these errors were encountered: