-
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
[Feature Request] Add functionality to update Sheet metadata, add additional tabs to Sheet and copy a Sheet to a new tab (vs a whole new Sheet) #125
Comments
Oh, so i figured out that the sheetID refers to the GID. but when i insert the right value and try to copy to a new sheet now i get an error:
|
@queks - got it! checking it out! |
@queks - if you include the |
Yes, that works to create a new google spreadsheet document. So is it possible to create another sheet (tab) within the same spreadsheet? Say if i wanted to run a script regularly and upload the data to a different sheet tab each time for comparison, could i create a sheet dynamically when uploading the data? I was looking at Export-GSsheet, but it doesn't seem to allow that, so was trying to use Copy-GsSheet to do that instead, but what it does is create a whole new document instead, with a new URL. |
@queks - 2 things:
|
Here's what I'm trying to do. I run a script to go through 900 student blogs and grab highlighted items for their portfolios. I capture the embed codes for these items and store them in a table together with their student ID, grade, etc. But these blogs update over time, so I run the script regularly, especially closer to the end of the semester. Each time i run the script, i upload it to a google spreadsheet as a different tab with the date/time of the execution as the tab name. This is also for teachers to cross-reference to make sure the right items are being picked up. My initial try was to create a new tab with the date/time as the sheet name, but there isn't a feature to do that. So I went ahead with a tab called 'Staging' which I will then use to copy to a new tab. I managed to do that by specifying the same ID for both source and destination spreadsheets, but i still can't pre-define the name of the tab. This is the command that I'm running: but i can't use -NewSheetTitle to define the new tab's name or it will throw an error. |
Thanks, @queks! The error you're getting when including
|
No, its:
|
@queks - Got it. It's working as intended then, given the functionality of either parameter set on the function. The reason you're getting that error is you can't specify The current functionality of
What you're looking to do is manage the tabs/sheets within a single Google Sheet, which PSGSuite is not capable of doing yet (but will be soon). I'll keep you updated! |
Got it, thanks! btw, while you're working on that, is there a way to also allow the renaming of sheets and/or tabs? thank you! |
@queks - can do! updating your original issue description to clarify what's being asked |
Hey @queks - Just want to follow up and say I haven't forgotten about this request, just haven't had time to implement! I'll keep you updated as soon as I have an update to provide! Thanks for your patience around this! |
Hey @queks - Just a heads up, should have this finished up within the next week! I'll keep you updated! |
Thanks! I've been busy too, so no worries! |
Hey @queks It's been over 3 years, but I think there are finally some additions that will make this a lot easier. I've also added some helper functions that use those generated functions to simply some common operations around sheets - If you have more advanced needs, it should be possible to meet them using the auto-generated The initial function you were trying, |
The example given in https://github.com/scrthq/PSGSuite/wiki/Copy-GSSheet shows how to copy a sheet to a new sheet by providing the SourceSheetID. The parameter in the function indicates the SourceSheetID is a string, but i get the following error when copying from a sheet i titled 'Staging':
Copy-GSSheet : Cannot convert argument "sheetId", with value: "Staging", for "CopyTo" to type "System.Int32": "Cannot convert value "Staging" to type "System.Int32". Error: "Input string was not in a correct format.""
The text was updated successfully, but these errors were encountered: