diff --git a/gspread/worksheet.py b/gspread/worksheet.py index 6a6783b8..0a752fb7 100644 --- a/gspread/worksheet.py +++ b/gspread/worksheet.py @@ -197,6 +197,17 @@ def __init__( # kept for backward compatibility - publicly available # do not use if possible. self._spreadsheet = spreadsheet + self._column_headers = [] + + @property + def column_headers(self) -> List[str]: + if not self._column_headers: + self._column_headers = self.row_values(1) + return self._column_headers + + @column_headers.setter + def column_headers(self, value: List[str]) -> None: + self._column_headers = value def __repr__(self) -> str: return "<{} {} id:{}>".format(