PSGSuite icon indicating copy to clipboard operation
PSGSuite copied to clipboard

[Feature Request] Allow Sheet uploads greater than 10 MB

Open ConnorGriffin opened this issue 7 years ago • 2 comments

I have a process that uploads a sheet with about 25 MB worth of data when formatted into a Google Sheets API compatible object (the actual data itself is about 3 MB when exported as CSV).

When trying to use Export-GSSheet on this data, I receive the following:

Export-GSSheet : Exception calling "Execute" with "0" argument(s): "Google.Apis.Requests.RequestError
Request payload size exceeds the limit: 10485760 bytes. [400]
Errors [
        Message[Request payload size exceeds the limit: 10485760 bytes.] Location[ - ] Reason[badRequest] Domain[global]
]
"
At line:94 char:35
+ ... t = $billingTable | Export-GSSheet -NewSheetTitle $SheetName -Verbose
+                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Export-GSSheet

ConnorGriffin avatar Jun 22 '18 19:06 ConnorGriffin

Hey @ConnorGriffin - Thanks for opening this up! Looks like Google has a 10MB limit on multiple API's of theirs and that's what you're running up against 😞

Definitely going to see if I can build in some logic underneath Export-GSSheet to allow a workaround, but for now you can get around this by splitting your array from the imported CSV into quarters or thirds and iterating through and using the -Append flag on the rows after the first that don't need the header row to be re-pasted. Working on getting you an example now, give me a bit 😃

scrthq avatar Jun 23 '18 04:06 scrthq

Seems like it wouldn't be hard to add a recursive call, just re-using the existing code with the -Append switch. I'll test it out when I get a chance next week.

ConnorGriffin avatar Jun 24 '18 02:06 ConnorGriffin