Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to show and hide grid lines in a spreadsheet #1197

Closed
zahrevsky opened this issue May 28, 2023 · 4 comments · Fixed by #1202
Closed

Add ability to show and hide grid lines in a spreadsheet #1197

zahrevsky opened this issue May 28, 2023 · 4 comments · Fixed by #1202
Milestone

Comments

@zahrevsky
Copy link

Is your feature request related to a problem? Please describe.
Add ability to show and hide grid lines in a spreadsheet. This can be done via batch_update using the following request body:

     [{
         'updateSheetProperties': {
                "fields": "gridProperties.hideGridlines",
                "properties": {
                    "gridProperties": {
                        "hideGridlines": True,
                    },
                    "sheetId": self.sheet.id,
                },
            },
        }]

Docs for gridProperties: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/sheets#GridProperties

Additional context
There's a similar feature request about hiding rows/columns (#1006), which is solved in a pull request #1012. With hiding gridlines there are only two differences:

  1. batch_update body is updateSheetProperties, not updateDimensionProperties
  2. hide and unhide should be methods of a Spreadsheet class, not a Worksheet
@lavigne958 lavigne958 added this to the 5.10 milestone May 28, 2023
@lavigne958
Copy link
Collaborator

Hi thank you for proposing this feature, this can be done i presume I still need to check and test .

@alifeee
Copy link
Collaborator

alifeee commented May 31, 2023

  1. hide and unhide should be methods of a Spreadsheet class, not a Worksheet

Why should this be? On Google Sheets on the web, gridlines are shown/hidden per-worksheet.

@zahrevsky
Copy link
Author

  1. hide and unhide should be methods of a Spreadsheet class, not a Worksheet

Why should this be? On Google Sheets on the web, gridlines are shown/hidden per-worksheet.

Oops, I've got it wrong. Yes, this should be a Worksheet's method, not a Spreadsheet's

@alifeee
Copy link
Collaborator

alifeee commented Jun 1, 2023

I have implemented a version of this #1202

lavigne958 added a commit that referenced this issue Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants