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

Ability to change cell formats inside an existing googlesheet #179

Open
sanjmeh opened this issue Aug 7, 2020 · 0 comments
Open

Ability to change cell formats inside an existing googlesheet #179

sanjmeh opened this issue Aug 7, 2020 · 0 comments
Labels
feature a feature request or enhancement formats 💅

Comments

@sanjmeh
Copy link

sanjmeh commented Aug 7, 2020

Now that googlesheets4 has achieved stability, we can shift some really serious excel (writing) work from openxlsx to googlesheets4. The only reason I still use openxlsx, even for working within goooglesheets, is that it allows creation of styles (openxlsx::createStyle) and conditional formatting (openxlsx::conditionalFormatting). The openxlsx workbook formats interwork almost fine while editing as a google sheet once uploaded, although not perfect. A lot of improvement can be brought in and a direct update of gs formats (using googlesheets4 APIs) will be much better than making changes in an offline workbook and uploading it every time.

My order of preference within createStyle function would be (in case the feature needs to be broken up):

  1. fontSize
  2. wrapText
  3. numFmt
  4. locked
  5. valign
  6. halign
  7. textdecoration (bold, itallic)
  8. bgFill (Background Fill)

Note, I have used openxlsx::createStyle() function arguments as a vocabulary only, although we could improve on their structure a bit. Also there are confusing & quirky parameters in openxlsx e.g. fgFill fills up colour in a cell rather than bgFill and gridExpand =TRUE is needed almost always while the default is FALSE.

In addition a setcolwidth functionality (as in openxlsx) is essential, as the existing range_autofit does not serve the purpose when a column has lot of text and it needs to be in wraptext mode.

Apologies if I used too many openxlsx terms but that's the only reference available to move from an excel world to the googlesheets world in R.

Thanks

Sanjay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement formats 💅
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants