Last active
June 27, 2025 18:31
-
-
Save lopierra/b642b85860682ef9a7c0c316dde5b214 to your computer and use it in GitHub Desktop.
reorder tabs in Google Sheet alphabetically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(googlesheets4) | |
ss <- as_sheets_id("URL of Google Sheet") | |
# extract tab names and sort alphabetically | |
sheet_names_alpha <- ss %>% | |
sheet_names() %>% | |
sort() | |
ss %>% | |
sheet_relocate(sheet_names_alpha) | |
# immediately changes sheet (refresh in browser to see) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment