@@ -721,9 +721,8 @@ This will contain the `client_id` and `client_secret`
721
721
- An instance of `GSheetAuth` containing the client ID, client secret, redirect URI, and access token.
722
722
723
723
# Example
724
- ```
725
- connect_gsheet("your_client_id", "your_client_secret")
726
- read_gsheet("file_url_or_id")
724
+ ```julia
725
+ julia> connect_gsheet("your_client_id", "your_client_secret")
727
726
```
728
727
"""
729
728
@@ -733,7 +732,8 @@ const docstring_read_gsheet =
733
732
sheet::String="Sheet1",
734
733
range::String="",
735
734
col_names::Bool=true,
736
- skip::Int=0, n_max::Int=Inf,
735
+ skip::Int=0,
736
+ n_max::Int=1000,
737
737
col_select=nothing,
738
738
missing_value::String="")
739
739
@@ -750,6 +750,20 @@ Read data from a Google Sheet into a DataFrame.
750
750
- `missing_value::String`: Value to represent missing data. Defaults to an empty string.
751
751
752
752
# Examples
753
- ```
753
+ ```julia
754
+ julia> connect_gsheet("your_client_id", "your_client_secret")
755
+
756
+ julia> public_sheet = "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit?gid=0#gid=0";
757
+
758
+ julia> read_gsheet(public_sheet, sheet="Class Data", n_max=5)
759
+ 5×6 DataFrame
760
+ Row │ Student Name Gender Class Level Home State Major Extracurricular Activity
761
+ │ String String String String String String
762
+ ─────┼───────────────────────────────────────────────────────────────────────────────────
763
+ 1 │ Alexandra Female 4. Senior CA English Drama Club
764
+ 2 │ Andrew Male 1. Freshman SD Math Lacrosse
765
+ 3 │ Anna Female 1. Freshman NC English Basketball
766
+ 4 │ Becky Female 2. Sophomore SD Art Baseball
767
+ 5 │ Benjamin Male 4. Senior WI English Basketball
754
768
```
755
769
"""
0 commit comments