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

Bug - Unfreeze rows and columns doesn't work #672

Open
MathRobin opened this issue Jan 2, 2024 · 1 comment
Open

Bug - Unfreeze rows and columns doesn't work #672

MathRobin opened this issue Jan 2, 2024 · 1 comment

Comments

@MathRobin
Copy link
Contributor

I'm stucked with a gsheets i want to update because there are some rows and columns frozen.

I found this:

await worksheet.updateProperties({
  gridProperties: {
    frozenColumnCount: 0,
    frozenRowCount: 0,
  }
});

and it's "shorthand"

await worksheet.updateGridProperties({
  frozenColumnCount: 0,
  frozenRowCount: 0,
});

But in the two cases, it still say that i can't delete row frozen.

@MathRobin
Copy link
Contributor Author

MathRobin commented Jan 8, 2024

Ok, i found the problem, it's inside updateProperties method. It generates this call:

await worksheet._makeSingleUpdateRequest('updateSheetProperties', {
    properties: {
      sheetId,
      gridProperties: {
        frozenColumnCount: 0,
        frozenRowCount: 0,
      },
    },
    fields: 'gridProperties',
  });

when it should do this:

await worksheet._makeSingleUpdateRequest('updateSheetProperties', {
    properties: {
      sheetId,
      gridProperties: {
        frozenColumnCount: 0,
        frozenRowCount: 0,
      },
    },
-    fields: 'gridProperties',
+    fields: 'gridProperties.frozenColumnCount,gridProperties.frozenRowCount',
  });

Fields is not able to get the correct path of fields. Could be a good subject of PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant