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

Remove formatting of appended row in 'append_table'? #573

Open
caynebrister1 opened this issue Feb 8, 2023 · 3 comments
Open

Remove formatting of appended row in 'append_table'? #573

caynebrister1 opened this issue Feb 8, 2023 · 3 comments

Comments

@caynebrister1
Copy link

caynebrister1 commented Feb 8, 2023

Hey, I love this library, it is so much better than using the normal lib.

One thing I cant seem to solve is formatting being added to every appended row using 'append_table'. For some reason every time I append a row, the appended row inherits the formatting of the previous row. Is there a way to prevent this or to remove the formatting of the newly appended to after?

Thanks ahead of time!

@nithinmurali
Copy link
Owner

Hi, looks like that's the default behavior of the google sheets api call.

Some options i could think of (untested, might not work)

  • try passing valueInputOption=RAW or USER_ENTERED to the append_table call
  • remove formatting of the row by calling this. You can create a DataRange from the returned response["updates"][0]["updatedRange"]

@caynebrister1
Copy link
Author

Thanks! Getting off from work right now. Ill test it out tomorrow!

@caynebrister1
Copy link
Author

Hi, looks like that's the default behavior of the google sheets api call.

Some options i could think of (untested, might not work)

* try passing `valueInputOption=RAW or USER_ENTERED` to the append_table call

* remove formatting of the row by calling [this](https://pygsheets.readthedocs.io/en/latest/datarange.html#pygsheets.datarange.DataRange.apply_format). You can create a [DataRange](https://pygsheets.readthedocs.io/en/latest/datarange.html#pygsheets.datarange.DataRange) from the returned response["updates"][0]["updatedRange"]

For valueInputOption=RAW or USER_ENTERED did you mean valueInputOption='RAW'? valueInputOption='RAW' doesn't seem to work.

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

2 participants