SCRT-HQ / PSGSuite

Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
https://psgsuite.io/
Apache License 2.0
234 stars 66 forks source link

Get-GSSheetInfo defaults to include GridData without use of -IncludeGridData #248

Closed WJurecki closed 4 years ago

WJurecki commented 4 years ago

Get-GSSheetInfo -SpreadsheetId '1rhsAYTOB_vrpvfwImPmWy0TcVa2sgmQa_9u976'

returns GridData without the use of the -IncludeGridData parameter.

To get SheetInfo without GridData the following command needs to be used.

Get-GSSheetInfo -SpreadsheetId '1rhsAYTOB_vrpvfwImPmWy0TcVa2sgmQa_9u976' -IncludeGridData:$false

This functionality is not intuitive.

This functionality causes Export-GSSheet to take a long period of time to execute when operated against a very large existing spreadsheet because line 187 of Export-GSSheet does not include -IncludeGridData:$false

My request is to either fix the counterintuitive functionality of -IncludeGridData parameter on Get-GSSheetInfo or add -IncludeGridData:$false to line 187 of Export-GSSheet

scrthq commented 4 years ago

Checking this out, thank you @WJurecki !! Completely makes sense!

scrthq commented 4 years ago

Hey @WJurecki - v2.35.0 has added the fix(es) for this. Get-GSSheetInfo was actually forcing IncludeGridData to $true if not set in $PSBoundParameters, so I removed that to follow expectations. I've also explicitly set -IncludeGridData:$false in the internal call to Get-GSSheetInfo on Export-GSSheetInfo to cover bases there in the odd event that the first fix is reverted down the line for some reason.