Skip to content

Commit

Permalink
Merge pull request #1409 from burnash/update/readme-migration-guide
Browse files Browse the repository at this point in the history
update migration guide
  • Loading branch information
alifeee authored Feb 6, 2024
2 parents cb1a63e + af9eb4a commit 591a93d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ As well, `values` can no longer be a list, and must be a 2D array.
+ file.sheet1.update(range_name="B2:C2", values=[["54", "55"]])
```

### More

<details><summary>See More Migration Guide</summary>

### Change colors from dictionary to text

v6 uses hexadecimal color representation. Change all colors to hex. You can use the compatibility function `gspread.utils.convert_colors_to_hex_value()` to convert a dictionary to a hex string.
Expand Down Expand Up @@ -107,6 +111,18 @@ In v6 you can now only get *all* sheet records, using `Worksheet.get_all_records
In version 5 there are many warnings to mark deprecated feature/functions/methods.
They can be silenced by setting the `GSPREAD_SILENCE_WARNINGS` environment variable to `1`

### Add more data to `gspread.Worksheet.__init__`

```diff
gc = gspread.service_account(filename="google_credentials.json")
spreadsheet = gc.open_by_key("{{key}}")
properties = spreadsheet.fetch_sheet_metadata()["sheets"][0]["properties"]
- worksheet = gspread.Worksheet(spreadsheet, properties)
+ worksheet = gspread.Worksheet(spreadsheet, properties, spreadsheet.id, gc.http_client)
```

</details>

## More Examples

### Opening a Spreadsheet
Expand Down

0 comments on commit 591a93d

Please sign in to comment.