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

style picking #306

Merged
merged 9 commits into from
Sep 17, 2022
Merged

style picking #306

merged 9 commits into from
Sep 17, 2022

Conversation

JanMarvin
Copy link
Owner

@JanMarvin JanMarvin commented Aug 9, 2022

Provides wb_get_cell_style() and wb_set_cell_style().

wb <- wb_load(system.file("extdata", "oxlsx2_sheet.xlsx", package = "openxlsx2"))
styles <- wb_get_cell_style(wb, 1, "A10:G15")
wb <- wb_set_cell_style(wb, 1, "A30:G35", styles)
wb$open()

Needs

  • wrapper test
  • test
  • vignette entry
  • copy roxygen

@JanMarvin JanMarvin added this to To Do in styles via automation Aug 9, 2022
@JanMarvin JanMarvin linked an issue Aug 9, 2022 that may be closed by this pull request
@JanMarvin JanMarvin mentioned this pull request Sep 9, 2022
8 tasks
@JanMarvin
Copy link
Owner Author

@jmbarbone fyi: I'm not entirely happy with the return of wb_get_cell_style(). It simply returns the style id as character. This makes sense in the way openxlsx2 handles styles, but (a) it breaks the flow, chaining is not possible this way, and (b) we might want to make this a class we can check for and provide a custom print model, so that the user wont be entirely confused when seeing the results and debugging chains or pipes.

We might want to look at this for possible improvements in the future, but for this pull request and most likely for the upcoming release I'll go with the implemented approach. It works and is a slight improvement over the current status quo. That's currently good enough for me.

@JanMarvin JanMarvin merged commit a289b52 into main Sep 17, 2022
styles automation moved this from To Do to Done Sep 17, 2022
@JanMarvin JanMarvin deleted the get_cell_style branch September 17, 2022 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Copy cell style
1 participant