Returns one or more ranges of values from the sheet. :param list ranges: List of cell ranges in the A1 notation or named ranges. :param str major_dimension: (optional) The major dimension of the values. `Dimension.rows` ("ROWS") or `Dimension.cols` ("COLUMNS
(
self,
ranges: Iterable[str],
major_dimension: Optional[Dimension] = None,
value_render_option: Optional[ValueRenderOption] = None,
date_time_render_option: Optional[DateTimeOption] = None,
)
| 1021 | raise ValueError("return_type must be either ValueRange or ListOfLists") |
| 1022 | |
| 1023 | def batch_get( |
| 1024 | self, |
| 1025 | ranges: Iterable[str], |
| 1026 | major_dimension: Optional[Dimension] = None, |
| 1027 | value_render_option: Optional[ValueRenderOption] = None, |
| 1028 | date_time_render_option: Optional[DateTimeOption] = None, |
| 1029 | ) -> List[ValueRange]: |
| 1030 | """Returns one or more ranges of values from the sheet. |
| 1031 | |
| 1032 | :param list ranges: List of cell ranges in the A1 notation or named |
| 1033 | ranges. |
| 1034 | |
| 1035 | :param str major_dimension: (optional) The major dimension of the |
| 1036 | values. `Dimension.rows` ("ROWS") or `Dimension.cols` ("COLUMNS"). |
| 1037 | Defaults to Dimension.rows |
| 1038 | :type major_dimension: :class:`~gspread.utils.Dimension` |
| 1039 | |
| 1040 | :param value_render_option: (optional) Determines how values should |
| 1041 | be rendered in the output. See `ValueRenderOption`_ in |
| 1042 | the Sheets API. |
| 1043 | |
| 1044 | Possible values are: |
| 1045 | |
| 1046 | ``ValueRenderOption.formatted`` |
| 1047 | (default) Values will be calculated and formatted according |
| 1048 | to the cell's formatting. Formatting is based on the |
| 1049 | spreadsheet's locale, not the requesting user's locale. |
| 1050 | |
| 1051 | ``ValueRenderOption.unformatted`` |
| 1052 | Values will be calculated, but not formatted in the reply. |
| 1053 | For example, if A1 is 1.23 and A2 is =A1 and formatted as |
| 1054 | currency, then A2 would return the number 1.23. |
| 1055 | |
| 1056 | ``ValueRenderOption.formula`` |
| 1057 | Values will not be calculated. The reply will include |
| 1058 | the formulas. For example, if A1 is 1.23 and A2 is =A1 and |
| 1059 | formatted as currency, then A2 would return "=A1". |
| 1060 | |
| 1061 | .. _ValueRenderOption: https://developers.google.com/sheets/api/reference/rest/v4/ValueRenderOption |
| 1062 | |
| 1063 | :type value_render_option: :class:`~gspread.utils.ValueRenderOption` |
| 1064 | |
| 1065 | :param str date_time_render_option: (optional) How dates, times, and |
| 1066 | durations should be represented in the output. |
| 1067 | |
| 1068 | Possible values are: |
| 1069 | |
| 1070 | ``DateTimeOption.serial_number`` |
| 1071 | (default) Instructs date, time, datetime, and duration fields |
| 1072 | to be output as doubles in "serial number" format, |
| 1073 | as popularized by Lotus 1-2-3. |
| 1074 | |
| 1075 | ``DateTimeOption.formatted_string`` |
| 1076 | Instructs date, time, datetime, and duration fields to be output |
| 1077 | as strings in their given number format |
| 1078 | (which depends on the spreadsheet locale). |
| 1079 | |
| 1080 | .. note:: |