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

Vignette names #762

Merged
merged 3 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 41 additions & 18 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,56 @@
# openxlsx2 (development version)

## Fixes
## Breaking changes

* `wb_get_worksheet()`, `wb_ws()`, `wb_get_sheet_name()` are no longer exported. [735](https://github.com/JanMarvin/openxlsx2/pull/735) They never worked as expected.
* Use `wb_get_sheet_names()`, `wb_get_active_sheet()`, `wb_get_selected()` instead.

* `wbChartSheet` is now internal ([760](https://github.com/JanMarvin/openxlsx2/pull/760), @olivroy)

## Deprecated functions

* fix date1904 detection in `wb_to_df()`. Previous results from this somewhat rare file type were using a wrong timezone origin.
* corrections in vignettes
* fixes for loading workbooks with threaded comments
* fixes for loading workbooks with embeddings other than docx
These functions are no longer recommended.
They will continue to work for some time, but changing to newer functions is recommended.

* `delete_data()` is deprecated in favour of `wb_remove_tables()` or `wb_clean_sheet()`
* `create_comment()` is deprecated in favour of `wb_comment()`. Note that while `wb_comment()` has some new defaults, the behavior of `create_comment()` has not changed. ([758](https://github.com/JanMarvin/openxlsx2/pull/758), @olivroy)

## New features

* provide solve argument for `wb_merge_cells()`. This allows to solve cell intersecting regions. [733](https://github.com/JanMarvin/openxlsx2/pull/733)
* `wb_comment()` is a new helper function to help create `wbComment` objects
It is very similar to `create_comment()`, with the following differences:
* `author` looks at `options("openxlsx2.creator")`; (`create_comment()` only used `sys.getenv("user")`)
* `visible` defaults to `FALSE` to account for modern spreadsheet software behavior. (`create_comment()`, it is `TRUE`).
* `width` and `height` must now be of length 1. (In `create_comment()`, the first element is taken, other are ignored.)

* `wb_add_comment(comment = "x")` no longer errors when a comment as a character vector no longer fails [758, @olivroy](https://github.com/JanMarvin/openxlsx2/pull/758)
* `wb_get_sheet_names()` gains a `escape` argument to allow special XML characters to be escaped. [252](https://github.com/JanMarvin/openxlsx2/issues/252)

## Breaking changes
* `wb_color()` now accepts hex colors with leading sharp (e.g. "#FFFFF") [728](https://github.com/JanMarvin/openxlsx2/pull/728).

* no longer exporting `wb_get_sheet_name()`
* deprecating `delete_data()` and minor improvements to `wb_clean_sheet()`
* removing `wb_get_worksheet()`, `wb_ws()`. These never worked as expected.
* `create_comment()` has been renamed `wb_comment()`. [758, @olivroy](https://github.com/JanMarvin/openxlsx2/pull/758) The default arguments however are changed:
* `wb_merge_cells()` gains a `solve` argument. This allows to solve cell intersecting regions. [733](https://github.com/JanMarvin/openxlsx2/pull/733)

* `author` looks at `options("openxlsx2.creator")` in `wb_comment()` compared to only `sys.getenv("user")` in `create_comment()`
* `visible` defaults to `FALSE` in `wb_comment()` to account for modern spreadsheet software behavior.
In `create_comment()`, it is `TRUE`.
* `width` and `height` must now be of length 1. (In `create_comment()`, the first element is taken, other are ignored.)
* `wb_add_comment(comment = "x")` no longer errors when a comment as a character vector no longer fails ([758](https://github.com/JanMarvin/openxlsx2/pull/758), @olivroy)


## Documentation improvement

* Tweaks to documentation and vignettes to make them more consistent.

## Fixes

* `wb_to_df()` now handles `date1904` detection in . Previous results from this somewhat rare file type were using a wrong timezone origin.
* `wb_load()` handles more cases.
* With workbooks with threaded comments [731](https://github.com/JanMarvin/openxlsx2/issues/731)
* With workbooks with embeddings other than docx [732](https://github.com/JanMarvin/openxlsx2/pulls/732)
* with workbooks with long hyperlinks [753](https://github.com/JanMarvin/openxlsx2/issues/753)

* `wb_load()` adds the `path` to the `wbWorkbook` object. [741](https://github.com/JanMarvin/openxlsx2/issues/741)
* `wb_set_header_footer()` now works with special characters [747](https://github.com/JanMarvin/openxlsx2/issues/747)

## Internal changes

* `wb_get_active_sheet()`, `wb_set_active_sheet()`, `wb_get_selected()` and `wb_set_selected()` are now wrapper functions.
* `wb_get_active_sheet()`, `wb_set_active_sheet()`, `wb_get_selected()` and `wb_set_selected()` are now wrapper functions. [735](https://github.com/JanMarvin/openxlsx2/pull/735)



***************************************************************************
Expand Down Expand Up @@ -60,7 +83,7 @@
* `wb_grid_lines()` for `wb_set_grid_lines()`

* make `get_cell_refs()`, `get_date_origin()`, `guess_col_type()`, and `write_file()`, `dataframe_to_dims()`, `dims_to_dataframe()`, `wb_get_sheet_name()` internal functions
* make classes `styles_mgr()`, `wbSheetData`, `wbWorksheet`, `wbChartSheet`, `wbComment`, `wbHyperlink` internal
* make classes `styles_mgr()`, `wbSheetData`, `wbWorksheet`, `wbComment`, `wbHyperlink` internal

## New features

Expand Down
2 changes: 1 addition & 1 deletion R/class-workbook-wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ wb_add_data_table <- function(
#'
#' wb <- wb %>%
#' wb_add_pivot_table(df, dims = "A3",
#' filter = "am", rows = "cyl", cols = "gear", data = "disp"
#' filter = "am", rows = "cyl", cols = "gear", data = "disp"
#' )
#' @family workbook wrappers
#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/openxlsx2-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
#' * `options("openxlsx2.orientation" = "portrait")` ## page orientation
#' * `options("openxlsx2.sheet.default_name" = "Sheet")`
#' * `options("openxlsx2.rightToLeft" = NULL)`
#' * `options("openxlsx2.soon_deprecated" = FALSE)` ## warn if using camelCase
#' * `options("openxlsx2.creator")` ## Default is Windows Username
#' * `options("openxlsx2.soon_deprecated" = FALSE)` ## Set to `TRUE` if you want a warning if using some functions deprecated recently in openxlsx2
#' * `options("openxlsx2.creator")` ## A default name for the creator of comments or new `wbWorkbook` objects.
#'
#' @name openxlsx2_options
NULL
Expand Down
4 changes: 2 additions & 2 deletions man/openxlsx2_options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/wb_add_pivot_table.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vignettes/conditional-formatting.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Conditional Formatting"
title: "Add conditional formatting to a workbook"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Conditional Formatting}
%\VignetteIndexEntry{Add conditional formatting to a workbook}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand Down
4 changes: 2 additions & 2 deletions vignettes/openxlsx2_charts_manual.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "openxlsx2 charts manual"
title: "Add charts to a workbook"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{openxlsx2 charts manual}
%\VignetteIndexEntry{Add charts to a workbook}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand Down
4 changes: 2 additions & 2 deletions vignettes/openxlsx2_formulas_manual.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "openxlsx2 formulas manual"
title: "Add formulas to a workbook"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{openxlsx2 formulas manual}
%\VignetteIndexEntry{Add formulas to a workbook}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand Down
4 changes: 2 additions & 2 deletions vignettes/openxlsx2_style_manual.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "openxlsx2 style manual"
title: "Add styling to a workbook"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{openxlsx2 style manual}
%\VignetteIndexEntry{Add styling to a workbook}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand Down
Loading