Skip to content

Commit

Permalink
Remove wbChartSheet from exports (#760)
Browse files Browse the repository at this point in the history
* Redo pkgdown index. Remove docs for `wb_hyperlink()`. It was not exported anyway.

* Oops

* Tweak docs and add warnings about chartsheets to the description field.
  • Loading branch information
olivroy committed Aug 24, 2023
1 parent 74ba5e5 commit f5209f5
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 217 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Expand Up @@ -39,7 +39,6 @@ export(remove_comment)
export(rowcol_to_dims)
export(styles_on_sheet)
export(temp_xlsx)
export(wbChartSheet)
export(wbWorkbook)
export(wb_add_border)
export(wb_add_cell_style)
Expand Down
3 changes: 1 addition & 2 deletions R/class-chart-sheet.R
Expand Up @@ -3,8 +3,7 @@
#'
#' @description
#' A chart sheet
#'
#' @export
#' @noRd
wbChartSheet <- R6::R6Class(
"wbChartSheet",

Expand Down
2 changes: 1 addition & 1 deletion R/class-hyperlink.R
Expand Up @@ -72,7 +72,7 @@ wbHyperlink <- R6::R6Class(
)

#' Create a new hyperlink object
#' @rdname Hyperlink
#' @noRd
wb_hyperlink <- function() {
wbHyperlink$new(ref = character(), target = character(), location = character())
}
Expand Down
18 changes: 7 additions & 11 deletions R/class-workbook-wrappers.R
Expand Up @@ -553,18 +553,14 @@ wb_unmerge_cells <- function(wb, sheet = current_sheet(), dims = NULL, ...) {

#' Add a chartsheet to a workbook
#'
#' A chartsheet is a special type of sheet that handles charts output. You must
#' add a chart to the sheet. Otherwise, this will break the workbook.
#'
#' @param wb A Workbook object to attach the new chartsheet
#' @param sheet A name for the new chartsheet
#' @param tab_color Color of the chartsheet tab. A valid color (belonging to
#' `colors()`) or a valid hex color beginning with "#"
#' @param zoom A numeric between 10 and 400. Worksheet zoom level as a
#' percentage.
#' @param visible If `FALSE`, sheet is hidden else visible.
#' @param ... ...
#' @details After chartsheet creation a chart must be added to the sheet.
#' Otherwise the chartsheet will break the workbook.
#' @inheritParams wb_add_worksheet
#' @family workbook wrappers
#' @seealso [wb_add_mschart()] [wbChartSheet]
#' @seealso [wb_add_mschart()]
#' @export
wb_add_chartsheet <- function(
wb,
Expand Down Expand Up @@ -606,9 +602,9 @@ wb_add_chartsheet <- function(
#' hidden.
#' @param row_col_headers A logical. If `FALSE`, the worksheet colname and rowname will be
#' hidden.
#' @param tab_color Color of the worksheet tab. A [wb_color()], a valid color (belonging to
#' @param tab_color Color of the sheet tab. A [wb_color()], a valid color (belonging to
#' `grDevices::colors()`) or a valid hex color beginning with "#".
#' @param zoom The worksheet zoom level, a numeric between 10 and 400 as a
#' @param zoom The sheet zoom level, a numeric between 10 and 400 as a
#' percentage. (A zoom value smaller than 10 will default to 10.)
#' @param header,odd_header,even_header,first_header,footer,odd_footer,even_footer,first_footer
#' Character vector of length 3 corresponding to positions left, center,
Expand Down
7 changes: 6 additions & 1 deletion R/dates.R
Expand Up @@ -178,8 +178,13 @@ convert_to_excel_date <- function(df, date1904 = FALSE) {
df
}

#' Convert to Excel data
#'
#' Use [convert_to_excel_date()] in new code
#' @usage NULL
#' @inheritParams convert_to_excel_date
#' @keywords internal
#' @export
#' @rdname convert_to_excel_date
convertToExcelDate <- function(df, date1904 = FALSE) {
.Deprecated(old = "convertToExcelDate", new = "convert_to_excel_date", package = "openxlsx2")
convert_to_excel_date(df = df, date1904 = date1904)
Expand Down
2 changes: 0 additions & 2 deletions _pkgdown.yml
Expand Up @@ -75,7 +75,6 @@ reference:
These functions help you interact with chartsheets. They invisibly return the
wbWorkbook object. They help interact with the mschart package.
contents:
- wbChartSheet
- wb_data
- wb_add_chartsheet
- wb_add_mschart
Expand All @@ -93,7 +92,6 @@ reference:
- wb_dims
- wb_color
- wb_comment
- wb_hyperlink
- starts_with("create_")


Expand Down
11 changes: 0 additions & 11 deletions man/Hyperlink.Rd

This file was deleted.

14 changes: 14 additions & 0 deletions man/convertToExcelDate.Rd

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

3 changes: 0 additions & 3 deletions man/convert_to_excel_date.Rd

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

172 changes: 0 additions & 172 deletions man/wbChartSheet.Rd

This file was deleted.

19 changes: 8 additions & 11 deletions man/wb_add_chartsheet.Rd

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

4 changes: 2 additions & 2 deletions man/wb_add_worksheet.Rd

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

0 comments on commit f5209f5

Please sign in to comment.