Skip to content
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

[Feature Request] Allow Sheet uploads greater than 10 MB #62

Open
ConnorGriffin opened this issue Jun 22, 2018 · 2 comments
Open

[Feature Request] Allow Sheet uploads greater than 10 MB #62

ConnorGriffin opened this issue Jun 22, 2018 · 2 comments

Comments

@ConnorGriffin
Copy link

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
@scrthq
Copy link
Member

scrthq commented Jun 23, 2018

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 scrthq self-assigned this Jun 23, 2018
@ConnorGriffin
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants