diff --git a/pkgdown.yml b/pkgdown.yml index bd84823..e64604b 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 3.1.11 pkgdown: 2.1.1 pkgdown_sha: ~ articles: {} -last_built: 2024-11-23T15:36Z +last_built: 2024-11-27T14:53Z urls: reference: https://elipousson.github.io/openxlsx2Extras/reference article: https://elipousson.github.io/openxlsx2Extras/articles diff --git a/reference/wb_add_data_ext.html b/reference/wb_add_data_ext.html index 0d4a312..fabff1a 100644 --- a/reference/wb_add_data_ext.html +++ b/reference/wb_add_data_ext.html @@ -123,8 +123,7 @@

Argumentsgeometry -

String, one of "drop" (default), "coords", or "wkt". Both -"coords" and "wkt" are not yet supported.

+

String, one of "drop" (default), "coords", or "wkt".

labels
diff --git a/reference/wb_save_ext.html b/reference/wb_save_ext.html index b4d8e1f..16224be 100644 --- a/reference/wb_save_ext.html +++ b/reference/wb_save_ext.html @@ -1,11 +1,11 @@ Save a workboook object to file while filling file name from assigned workbook title — wb_save_ext • openxlsx2Extras +wb_save_ext() is a helper function extending openxlsx2::wb_save() by +filling a missing file name with the workbook title and validating the file +extension. This function is not stable and may change in the future."> Skip to contents @@ -40,9 +40,9 @@

Save a workboook object to file while filling file name from assigned workbo

[Experimental]

-

wb_save_ext() is a helper function that fills in the file name when saving -based on the XSLX title. This function is not stable and may change in the -future.

+

wb_save_ext() is a helper function extending openxlsx2::wb_save() by +filling a missing file name with the workbook title and validating the file +extension. This function is not stable and may change in the future.

diff --git a/reference/write_xlsx_ext.html b/reference/write_xlsx_ext.html index 7172823..cf82b6e 100644 --- a/reference/write_xlsx_ext.html +++ b/reference/write_xlsx_ext.html @@ -178,8 +178,7 @@

Argumentsgeometry -

String, one of "drop" (default), "coords", or "wkt". Both -"coords" and "wkt" are not yet supported.

+

String, one of "drop" (default), "coords", or "wkt".

labels
diff --git a/search.json b/search.json index 060000e..6860171 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://elipousson.github.io/openxlsx2Extras/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 openxlsx2Extras authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Eli Pousson. Author, maintainer, copyright holder.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Pousson E (2024). openxlsx2Extras: Extra Functions openxlsx2 package. R package version 0.0.0.9000, https://elipousson.github.io/openxlsx2Extras/, https://github.com/elipousson/openxlsx2Extras.","code":"@Manual{, title = {openxlsx2Extras: Extra Functions for the openxlsx2 package}, author = {Eli Pousson}, year = {2024}, note = {R package version 0.0.0.9000, https://elipousson.github.io/openxlsx2Extras/}, url = {https://github.com/elipousson/openxlsx2Extras}, }"},{"path":"https://elipousson.github.io/openxlsx2Extras/index.html","id":"openxlsx2extras","dir":"","previous_headings":"","what":"Extra Functions for the openxlsx2 package","title":"Extra Functions for the openxlsx2 package","text":"goal openxlsx2Extras extend functionality {openxlsx2} R package.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Extra Functions for the openxlsx2 package","text":"can install development version openxlsx2Extras like :","code":"pak::pkg_install(\"elipousson/openxlsx2Extras\")"},{"path":"https://elipousson.github.io/openxlsx2Extras/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Extra Functions for the openxlsx2 package","text":"basic example shows use wb_save_ext() set filename based workbook title:","code":"library(openxlsx2) library(openxlsx2Extras) withr::with_tempdir({ wb_workbook( title = \"Title used for output file\" ) |> wb_add_worksheet() |> wb_save_ext() fs::dir_ls() }) #> Title used for output file.xlsx"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_lgl_cols.html","id":null,"dir":"Reference","previous_headings":"","what":"Format logical vector columns to use replacement values — fmt_lgl_cols","title":"Format logical vector columns to use replacement values — fmt_lgl_cols","text":"fmt_lgl_cols() uses vec_fmt_lgl() format (specified) logical vector columns use replacement values.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_lgl_cols.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format logical vector columns to use replacement values — fmt_lgl_cols","text":"","code":"fmt_lgl_cols( .data, .cols = tidyselect::where(is.logical), values = c(\"Y\", \"N\") )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_lgl_cols.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format logical vector columns to use replacement values — fmt_lgl_cols","text":".cols Columns transform. select grouping columns already automatically handled verb (.e. summarise() mutate()). values Default c(\"Y\", \"N\") Length 2 vector first element replaces TRUE second element replaces FALSE.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_lgl_cols.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format logical vector columns to use replacement values — fmt_lgl_cols","text":"","code":"fmt_lgl_cols(data.frame(x = c(TRUE, FALSE, TRUE))) #> x #> 1 Y #> 2 N #> 3 Y"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_marquee_txt.html","id":null,"dir":"Reference","previous_headings":"","what":"Use marquee::marquee_parse() to format Markdown text — fmt_marquee_txt","title":"Use marquee::marquee_parse() to format Markdown text — fmt_marquee_txt","text":"fmt_marquee_txt() uses marquee::marquee_parse() openxlsx2::fmt_txt() format Markdown text.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_marquee_txt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use marquee::marquee_parse() to format Markdown text — fmt_marquee_txt","text":"","code":"fmt_marquee_txt( text, ..., style = marquee::classic_style(), ignore_html = TRUE )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_marquee_txt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use marquee::marquee_parse() to format Markdown text — fmt_marquee_txt","text":"text character string. core quality markdown text valid markdown restrictions content ... Ignored time. future use. style style set classic_style() defines text rendered ignore_html HTML code removed output","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_marquee_txt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Use marquee::marquee_parse() to format Markdown text — fmt_marquee_txt","text":"","code":"fmt_marquee_txt( \"# ABC abc\" ) #> [[1]] #> fmt_txt string: #> [1] \"\" #> #> [[2]] #> fmt_txt string: #> [1] \"ABC\" #> #> [[3]] #> fmt_txt string: #> [1] \"abc\" #>"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/openxlsx2Extras-package.html","id":null,"dir":"Reference","previous_headings":"","what":"openxlsx2Extras: Extra Functions for the openxlsx2 package — openxlsx2Extras-package","title":"openxlsx2Extras: Extra Functions for the openxlsx2 package — openxlsx2Extras-package","text":"Extends openxlsx2 package wrapper helper functions designed add new features options working Excel workbooks.","code":""},{"path":[]},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/openxlsx2Extras-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"openxlsx2Extras: Extra Functions for the openxlsx2 package — openxlsx2Extras-package","text":"Maintainer: Eli Pousson eli.pousson@gmail.com (ORCID) [copyright holder]","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/read_xlsx_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a data frame from a Workbook (with extra features) — read_xlsx_ext","title":"Create a data frame from a Workbook (with extra features) — read_xlsx_ext","text":"read_xlsx_ext() uses openxlsx2::read_xlsx() allows use name repair argument (\"unique\" default) avoid blank \"\" NA values column names.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/read_xlsx_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a data frame from a Workbook (with extra features) — read_xlsx_ext","text":"","code":"read_xlsx_ext(file, ..., repair = \"unique\")"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/read_xlsx_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a data frame from a Workbook (with extra features) — read_xlsx_ext","text":"file xlsx file, wbWorkbook object URL xlsx file. ... Arguments passed openxlsx2::read_xlsx sheet Either sheet name index. missing first sheet workbook selected. start_row first row begin looking data. start_col first column begin looking data. row_names TRUE, first col data used row names. col_names TRUE, first row data used column names. skip_empty_rows TRUE, empty rows skipped. skip_empty_cols TRUE, empty columns skipped. rows numeric vector specifying rows xlsx file read. NULL, rows read. cols numeric vector specifying columns xlsx file read. NULL, columns read. detect_dates TRUE, attempt recognize dates perform conversion. na.strings character vector strings interpreted NA. Blank cells returned NA. na.numbers numeric vector digits interpreted NA. Blank cells returned NA. fill_merged_cells TRUE, value merged cell given cells within merge. named_region Character string named_region (defined name table). sheet selected, first appearance selected. See wb_get_named_regions() check_names TRUE names variables data frame checked ensure syntactically valid variable names. show_hyperlinks TRUE instead displayed text, hyperlink targets shown. repair Either string function. string, must one \"check_unique\", \"minimal\", \"unique\", \"universal\", \"unique_quiet\", \"universal_quiet\". function, invoked vector minimal names must return minimal names, otherwise error thrown. Minimal names never NULL NA. element name, minimal name empty string. Unique names unique. suffix appended duplicate names make unique. Universal names unique syntactic, meaning can safely use names variables without causing syntax error. \"check_unique\" option perform name repair. Instead, error raised names suit \"unique\" criteria. options \"unique_quiet\" \"universal_quiet\" help user calls function indirectly, via another function exposes repair quiet. Specifying repair = \"unique_quiet\" like specifying repair = \"unique\", quiet = TRUE. \"*_quiet\" options used, setting quiet silently overridden.","code":""},{"path":[]},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/set_excel_fmt_class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare a data frame with Excel style class values for formatting by openxlsx2 — set_excel_fmt_class","text":"","code":"set_excel_fmt_class(data, cols, fmt_class = \"currency\", multiple = TRUE)"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/set_excel_fmt_class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare a data frame with Excel style class values for formatting by openxlsx2 — set_excel_fmt_class","text":"data data frame columns format. cols Column names numbers modify. fmt_class Excel style class, one : c(\"currency\", \"accounting\", \"hyperlink\", \"percentage\", \"scientific\", \"formula\"). Length recycled match length cols using vctrs::vec_recycle(). multiple Whether arg may contain zero several values.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/set_excel_fmt_class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Prepare a data frame with Excel style class values for formatting by openxlsx2 — set_excel_fmt_class","text":"set_excel_fmt_class() applies style specified column. See openxlsx2 documentation information feature: https://janmarvin.github.io/openxlsx2/articles/openxlsx2_style_manual.html#numfmts2","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/vec_fmt_lgl.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a logical vector to specified values — vec_fmt_lgl","title":"Format a logical vector to specified values — vec_fmt_lgl","text":"Format logical vector specified values","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/vec_fmt_lgl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a logical vector to specified values — vec_fmt_lgl","text":"","code":"vec_fmt_lgl(x, values = c(\"Y\", \"N\"))"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/vec_fmt_lgl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a logical vector to specified values — vec_fmt_lgl","text":"x logical vector. values Default c(\"Y\", \"N\") Length 2 vector first element replaces TRUE second element replaces FALSE.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/vec_fmt_lgl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format a logical vector to specified values — vec_fmt_lgl","text":"","code":"vec_fmt_lgl(c(TRUE, FALSE)) #> [1] \"Y\" \"N\" vec_fmt_lgl(c(TRUE, FALSE), c(\"Yes\", \"No\")) #> [1] \"Yes\" \"No\""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_data_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Add data using openxlsx2::wb_add_data() with extra features — wb_add_data_ext","title":"Add data using openxlsx2::wb_add_data() with extra features — wb_add_data_ext","text":"wb_add_data_ext() extends openxlsx2::wb_add_data() add data workbook special handling sf input objects labelled data.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_data_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add data using openxlsx2::wb_add_data() with extra features — wb_add_data_ext","text":"","code":"wb_add_data_ext( wb, x, ..., start_row = 1, geometry = c(\"drop\", \"coords\", \"wkt\"), labels = c(\"drop\", \"row_before\"), call = caller_env() )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_data_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add data using openxlsx2::wb_add_data() with extra features — wb_add_data_ext","text":"wb Workbook object containing worksheet. x Object written. classes supported look examples. ... Arguments passed openxlsx2::wb_add_data sheet worksheet write . Can worksheet index name. dims Spreadsheet cell range determine start_col start_row: \"A1\", \"A1:B2\", \":B\" start_col vector specifying starting column write x . array bool function written type array col_names TRUE, column names x written. row_names TRUE, row names x written. with_filter TRUE, add filters column name row. NOTE: can one filter per worksheet. name name named region specified. sep applies list columns. separator used collapse list columns character vector e.g. sapply(x$list_column, paste, collapse = sep). apply_cell_style write cell styles workbook remove_cell_style keep cell style? na.strings Value used replacing NA values x. Default looks options(openxlsx2.na.strings) set. Otherwise na_strings() uses special #N/value within workbook. inline_strings write characters inline strings enforce enforce selected dims filled. work, dims must match x start_row vector specifying starting row write x . geometry String, one \"drop\" (default), \"coords\", \"wkt\". \"coords\" \"wkt\" yet supported. labels Method handling column labels. \"drop\" (default) \"row_before\". \"row_before\", insert column labels row column names. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_marquee_text.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Markdown formatted text to a Workbook — wb_add_marquee_text","title":"Add Markdown formatted text to a Workbook — wb_add_marquee_text","text":"wb_add_marquee_text() uses fmt_marquee_txt() add Markdown formatted text Workbook. openxlsx2::wb_set_col_widths() applied workbook adjust widths specified columns. Set widths = NULL disable functionality.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_marquee_text.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Markdown formatted text to a Workbook — wb_add_marquee_text","text":"","code":"wb_add_marquee_text( wb = NULL, text, sheet = current_sheet(), dims = NULL, ..., cols = 1, widths = \"auto\" )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_marquee_text.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Markdown formatted text to a Workbook — wb_add_marquee_text","text":"wb Workbook object containing worksheet. text character string. core quality markdown text valid markdown restrictions content sheet worksheet write . Can worksheet index name. dims Spreadsheet cell range determine start_col start_row: \"A1\", \"A1:B2\", \":B\" ... Arguments passed fmt_marquee_txt style style set classic_style() defines text rendered ignore_html HTML code removed output cols Indices cols set/remove column widths. widths Width set cols specified column width \"auto\" automatic sizing. widths recycled length cols. openxlsx2 sets default width 8.43, standard spreadsheet software. See Details general information column widths.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_marquee_text.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Markdown formatted text to a Workbook — wb_add_marquee_text","text":"","code":"library(openxlsx2) wb_workbook() |> wb_add_worksheet() |> wb_add_marquee_text( text = \" # Heading 1 Example text. ~~Strikethrough text~~ ## Heading 2 - Bulleted list item 1 - Nested bullet - Bulleted list item 2\" )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_save_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Save a workboook object to file while filling file name from assigned workbook title — wb_save_ext","title":"Save a workboook object to file while filling file name from assigned workbook title — wb_save_ext","text":"wb_save_ext() helper function fills file name saving based XSLX title. function stable may change future.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_save_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save a workboook object to file while filling file name from assigned workbook title — wb_save_ext","text":"","code":"wb_save_ext(wb, file = NULL, overwrite = TRUE, ...)"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_save_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save a workboook object to file while filling file name from assigned workbook title — wb_save_ext","text":"wb wbWorkbook object write file file path save workbook overwrite FALSE, overwrite file already exists. ... Arguments passed openxlsx2::wb_save path Deprecated argument. Please use file new code.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_save_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Save a workboook object to file while filling file name from assigned workbook title — wb_save_ext","text":"","code":"library(openxlsx2) withr::with_tempdir({ wb_workbook( title = \"Title used for output file\" ) |> wb_add_worksheet() |> wb_save_ext() fs::dir_ls() }) #> Title used for output file.xlsx"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/write_xlsx_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Write data to an xlsx file with additional features — write_xlsx_ext","title":"Write data to an xlsx file with additional features — write_xlsx_ext","text":"write_xlsx_ext() wraps wb_add_data_ext() provide equivalent openxlsx2::write_xlsx() better support sf labelled data. Arguments passed openxlsx2::wb_workbook() ignored x workbook instead data frame.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/write_xlsx_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write data to an xlsx file with additional features — write_xlsx_ext","text":"","code":"write_xlsx_ext( x, file = NULL, as_table = FALSE, ..., creator = NULL, title = NULL, subject = NULL, category = NULL, datetime_created = Sys.time(), theme = NULL, keywords = NULL, start_row = 1, overwrite = TRUE, geometry = c(\"drop\", \"coords\", \"wkt\"), labels = c(\"drop\", \"row_before\"), call = caller_env() )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/write_xlsx_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write data to an xlsx file with additional features — write_xlsx_ext","text":"x object list objects can handled wb_add_data() write file. file optional xlsx file name. file passed, object written disk workbook object returned. as_table TRUE, write data table, instead data. ... Arguments passed wb_workbook, wb_add_worksheet, wb_add_data_table, wb_add_data, wb_freeze_pane, wb_set_col_widths, wb_save creator Creator workbook (name). Defaults login username options(\"openxlsx2.creator\") set. sheet name new worksheet grid_lines logical. FALSE, worksheet grid lines hidden. tab_color Color sheet tab. wb_color(), valid color (belonging grDevices::colors()) valid hex color beginning \"#\". zoom sheet zoom level, numeric 10 400 percentage. (zoom value smaller 10 default 10.) total_row logical. default FALSE total row added. start_col vector specifying starting column write x . start_row vector specifying starting row write x . col_names TRUE, column names x written. row_names TRUE, row names x written. na.strings Value used replacing NA values x. Default looks options(openxlsx2.na.strings) set. Otherwise na_strings() uses special #N/value within workbook. first_active_row Top row active region first_active_col Furthest left column active region first_row TRUE, freezes first row (equivalent first_active_row = 2) first_col TRUE, freezes first column (equivalent first_active_col = 2) widths Width set cols specified column width \"auto\" automatic sizing. widths recycled length cols. openxlsx2 sets default width 8.43, standard spreadsheet software. See Details general information column widths. overwrite FALSE, overwrite file already exists. creator Creator workbook (name). Defaults login username options(\"openxlsx2.creator\") set. title, subject, category, keywords Additional workbook properties passed openxlsx2::wb_workbook(). Ignored (creator title) x workbook instead data frame. datetime_created time workbook created theme Optional theme identified string number. See Details options. start_row vector specifying starting row write x . overwrite FALSE, overwrite file already exists. geometry String, one \"drop\" (default), \"coords\", \"wkt\". \"coords\" \"wkt\" yet supported. labels Method handling column labels. \"drop\" (default) \"row_before\". \"row_before\", insert column labels row column names. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""}] +[{"path":"https://elipousson.github.io/openxlsx2Extras/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 openxlsx2Extras authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Eli Pousson. Author, maintainer, copyright holder.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Pousson E (2024). openxlsx2Extras: Extra Functions openxlsx2 package. R package version 0.0.0.9000, https://elipousson.github.io/openxlsx2Extras/, https://github.com/elipousson/openxlsx2Extras.","code":"@Manual{, title = {openxlsx2Extras: Extra Functions for the openxlsx2 package}, author = {Eli Pousson}, year = {2024}, note = {R package version 0.0.0.9000, https://elipousson.github.io/openxlsx2Extras/}, url = {https://github.com/elipousson/openxlsx2Extras}, }"},{"path":"https://elipousson.github.io/openxlsx2Extras/index.html","id":"openxlsx2extras","dir":"","previous_headings":"","what":"Extra Functions for the openxlsx2 package","title":"Extra Functions for the openxlsx2 package","text":"goal openxlsx2Extras extend functionality {openxlsx2} R package.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Extra Functions for the openxlsx2 package","text":"can install development version openxlsx2Extras like :","code":"pak::pkg_install(\"elipousson/openxlsx2Extras\")"},{"path":"https://elipousson.github.io/openxlsx2Extras/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Extra Functions for the openxlsx2 package","text":"basic example shows use wb_save_ext() set filename based workbook title:","code":"library(openxlsx2) library(openxlsx2Extras) withr::with_tempdir({ wb_workbook( title = \"Title used for output file\" ) |> wb_add_worksheet() |> wb_save_ext() fs::dir_ls() }) #> Title used for output file.xlsx"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_lgl_cols.html","id":null,"dir":"Reference","previous_headings":"","what":"Format logical vector columns to use replacement values — fmt_lgl_cols","title":"Format logical vector columns to use replacement values — fmt_lgl_cols","text":"fmt_lgl_cols() uses vec_fmt_lgl() format (specified) logical vector columns use replacement values.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_lgl_cols.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format logical vector columns to use replacement values — fmt_lgl_cols","text":"","code":"fmt_lgl_cols( .data, .cols = tidyselect::where(is.logical), values = c(\"Y\", \"N\") )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_lgl_cols.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format logical vector columns to use replacement values — fmt_lgl_cols","text":".cols Columns transform. select grouping columns already automatically handled verb (.e. summarise() mutate()). values Default c(\"Y\", \"N\") Length 2 vector first element replaces TRUE second element replaces FALSE.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_lgl_cols.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format logical vector columns to use replacement values — fmt_lgl_cols","text":"","code":"fmt_lgl_cols(data.frame(x = c(TRUE, FALSE, TRUE))) #> x #> 1 Y #> 2 N #> 3 Y"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_marquee_txt.html","id":null,"dir":"Reference","previous_headings":"","what":"Use marquee::marquee_parse() to format Markdown text — fmt_marquee_txt","title":"Use marquee::marquee_parse() to format Markdown text — fmt_marquee_txt","text":"fmt_marquee_txt() uses marquee::marquee_parse() openxlsx2::fmt_txt() format Markdown text.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_marquee_txt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use marquee::marquee_parse() to format Markdown text — fmt_marquee_txt","text":"","code":"fmt_marquee_txt( text, ..., style = marquee::classic_style(), ignore_html = TRUE )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_marquee_txt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use marquee::marquee_parse() to format Markdown text — fmt_marquee_txt","text":"text character string. core quality markdown text valid markdown restrictions content ... Ignored time. future use. style style set classic_style() defines text rendered ignore_html HTML code removed output","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/fmt_marquee_txt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Use marquee::marquee_parse() to format Markdown text — fmt_marquee_txt","text":"","code":"fmt_marquee_txt( \"# ABC abc\" ) #> [[1]] #> fmt_txt string: #> [1] \"\" #> #> [[2]] #> fmt_txt string: #> [1] \"ABC\" #> #> [[3]] #> fmt_txt string: #> [1] \"abc\" #>"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/openxlsx2Extras-package.html","id":null,"dir":"Reference","previous_headings":"","what":"openxlsx2Extras: Extra Functions for the openxlsx2 package — openxlsx2Extras-package","title":"openxlsx2Extras: Extra Functions for the openxlsx2 package — openxlsx2Extras-package","text":"Extends openxlsx2 package wrapper helper functions designed add new features options working Excel workbooks.","code":""},{"path":[]},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/openxlsx2Extras-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"openxlsx2Extras: Extra Functions for the openxlsx2 package — openxlsx2Extras-package","text":"Maintainer: Eli Pousson eli.pousson@gmail.com (ORCID) [copyright holder]","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/read_xlsx_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a data frame from a Workbook (with extra features) — read_xlsx_ext","title":"Create a data frame from a Workbook (with extra features) — read_xlsx_ext","text":"read_xlsx_ext() uses openxlsx2::read_xlsx() allows use name repair argument (\"unique\" default) avoid blank \"\" NA values column names.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/read_xlsx_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a data frame from a Workbook (with extra features) — read_xlsx_ext","text":"","code":"read_xlsx_ext(file, ..., repair = \"unique\")"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/read_xlsx_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a data frame from a Workbook (with extra features) — read_xlsx_ext","text":"file xlsx file, wbWorkbook object URL xlsx file. ... Arguments passed openxlsx2::read_xlsx sheet Either sheet name index. missing first sheet workbook selected. start_row first row begin looking data. start_col first column begin looking data. row_names TRUE, first col data used row names. col_names TRUE, first row data used column names. skip_empty_rows TRUE, empty rows skipped. skip_empty_cols TRUE, empty columns skipped. rows numeric vector specifying rows xlsx file read. NULL, rows read. cols numeric vector specifying columns xlsx file read. NULL, columns read. detect_dates TRUE, attempt recognize dates perform conversion. na.strings character vector strings interpreted NA. Blank cells returned NA. na.numbers numeric vector digits interpreted NA. Blank cells returned NA. fill_merged_cells TRUE, value merged cell given cells within merge. named_region Character string named_region (defined name table). sheet selected, first appearance selected. See wb_get_named_regions() check_names TRUE names variables data frame checked ensure syntactically valid variable names. show_hyperlinks TRUE instead displayed text, hyperlink targets shown. repair Either string function. string, must one \"check_unique\", \"minimal\", \"unique\", \"universal\", \"unique_quiet\", \"universal_quiet\". function, invoked vector minimal names must return minimal names, otherwise error thrown. Minimal names never NULL NA. element name, minimal name empty string. Unique names unique. suffix appended duplicate names make unique. Universal names unique syntactic, meaning can safely use names variables without causing syntax error. \"check_unique\" option perform name repair. Instead, error raised names suit \"unique\" criteria. options \"unique_quiet\" \"universal_quiet\" help user calls function indirectly, via another function exposes repair quiet. Specifying repair = \"unique_quiet\" like specifying repair = \"unique\", quiet = TRUE. \"*_quiet\" options used, setting quiet silently overridden.","code":""},{"path":[]},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/set_excel_fmt_class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prepare a data frame with Excel style class values for formatting by openxlsx2 — set_excel_fmt_class","text":"","code":"set_excel_fmt_class(data, cols, fmt_class = \"currency\", multiple = TRUE)"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/set_excel_fmt_class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prepare a data frame with Excel style class values for formatting by openxlsx2 — set_excel_fmt_class","text":"data data frame columns format. cols Column names numbers modify. fmt_class Excel style class, one : c(\"currency\", \"accounting\", \"hyperlink\", \"percentage\", \"scientific\", \"formula\"). Length recycled match length cols using vctrs::vec_recycle(). multiple Whether arg may contain zero several values.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/set_excel_fmt_class.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Prepare a data frame with Excel style class values for formatting by openxlsx2 — set_excel_fmt_class","text":"set_excel_fmt_class() applies style specified column. See openxlsx2 documentation information feature: https://janmarvin.github.io/openxlsx2/articles/openxlsx2_style_manual.html#numfmts2","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/vec_fmt_lgl.html","id":null,"dir":"Reference","previous_headings":"","what":"Format a logical vector to specified values — vec_fmt_lgl","title":"Format a logical vector to specified values — vec_fmt_lgl","text":"Format logical vector specified values","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/vec_fmt_lgl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format a logical vector to specified values — vec_fmt_lgl","text":"","code":"vec_fmt_lgl(x, values = c(\"Y\", \"N\"))"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/vec_fmt_lgl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format a logical vector to specified values — vec_fmt_lgl","text":"x logical vector. values Default c(\"Y\", \"N\") Length 2 vector first element replaces TRUE second element replaces FALSE.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/vec_fmt_lgl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Format a logical vector to specified values — vec_fmt_lgl","text":"","code":"vec_fmt_lgl(c(TRUE, FALSE)) #> [1] \"Y\" \"N\" vec_fmt_lgl(c(TRUE, FALSE), c(\"Yes\", \"No\")) #> [1] \"Yes\" \"No\""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_data_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Add data using openxlsx2::wb_add_data() with extra features — wb_add_data_ext","title":"Add data using openxlsx2::wb_add_data() with extra features — wb_add_data_ext","text":"wb_add_data_ext() extends openxlsx2::wb_add_data() add data workbook special handling sf input objects labelled data.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_data_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add data using openxlsx2::wb_add_data() with extra features — wb_add_data_ext","text":"","code":"wb_add_data_ext( wb, x, ..., start_row = 1, geometry = c(\"drop\", \"coords\", \"wkt\"), labels = c(\"drop\", \"row_before\"), call = caller_env() )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_data_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add data using openxlsx2::wb_add_data() with extra features — wb_add_data_ext","text":"wb Workbook object containing worksheet. x Object written. classes supported look examples. ... Arguments passed openxlsx2::wb_add_data sheet worksheet write . Can worksheet index name. dims Spreadsheet cell range determine start_col start_row: \"A1\", \"A1:B2\", \":B\" start_col vector specifying starting column write x . array bool function written type array col_names TRUE, column names x written. row_names TRUE, row names x written. with_filter TRUE, add filters column name row. NOTE: can one filter per worksheet. name name named region specified. sep applies list columns. separator used collapse list columns character vector e.g. sapply(x$list_column, paste, collapse = sep). apply_cell_style write cell styles workbook remove_cell_style keep cell style? na.strings Value used replacing NA values x. Default looks options(openxlsx2.na.strings) set. Otherwise na_strings() uses special #N/value within workbook. inline_strings write characters inline strings enforce enforce selected dims filled. work, dims must match x start_row vector specifying starting row write x . geometry String, one \"drop\" (default), \"coords\", \"wkt\". labels Method handling column labels. \"drop\" (default) \"row_before\". \"row_before\", insert column labels row column names. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_marquee_text.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Markdown formatted text to a Workbook — wb_add_marquee_text","title":"Add Markdown formatted text to a Workbook — wb_add_marquee_text","text":"wb_add_marquee_text() uses fmt_marquee_txt() add Markdown formatted text Workbook. openxlsx2::wb_set_col_widths() applied workbook adjust widths specified columns. Set widths = NULL disable functionality.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_marquee_text.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Markdown formatted text to a Workbook — wb_add_marquee_text","text":"","code":"wb_add_marquee_text( wb = NULL, text, sheet = current_sheet(), dims = NULL, ..., cols = 1, widths = \"auto\" )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_marquee_text.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Markdown formatted text to a Workbook — wb_add_marquee_text","text":"wb Workbook object containing worksheet. text character string. core quality markdown text valid markdown restrictions content sheet worksheet write . Can worksheet index name. dims Spreadsheet cell range determine start_col start_row: \"A1\", \"A1:B2\", \":B\" ... Arguments passed fmt_marquee_txt style style set classic_style() defines text rendered ignore_html HTML code removed output cols Indices cols set/remove column widths. widths Width set cols specified column width \"auto\" automatic sizing. widths recycled length cols. openxlsx2 sets default width 8.43, standard spreadsheet software. See Details general information column widths.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_add_marquee_text.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Markdown formatted text to a Workbook — wb_add_marquee_text","text":"","code":"library(openxlsx2) wb_workbook() |> wb_add_worksheet() |> wb_add_marquee_text( text = \" # Heading 1 Example text. ~~Strikethrough text~~ ## Heading 2 - Bulleted list item 1 - Nested bullet - Bulleted list item 2\" )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_save_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Save a workboook object to file while filling file name from assigned workbook title — wb_save_ext","title":"Save a workboook object to file while filling file name from assigned workbook title — wb_save_ext","text":"wb_save_ext() helper function extending openxlsx2::wb_save() filling missing file name workbook title validating file extension. function stable may change future.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_save_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save a workboook object to file while filling file name from assigned workbook title — wb_save_ext","text":"","code":"wb_save_ext(wb, file = NULL, overwrite = TRUE, ...)"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_save_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save a workboook object to file while filling file name from assigned workbook title — wb_save_ext","text":"wb wbWorkbook object write file file path save workbook overwrite FALSE, overwrite file already exists. ... Arguments passed openxlsx2::wb_save path Deprecated argument. Please use file new code.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/wb_save_ext.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Save a workboook object to file while filling file name from assigned workbook title — wb_save_ext","text":"","code":"library(openxlsx2) withr::with_tempdir({ wb_workbook( title = \"Title used for output file\" ) |> wb_add_worksheet() |> wb_save_ext() fs::dir_ls() }) #> Title used for output file.xlsx"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/write_xlsx_ext.html","id":null,"dir":"Reference","previous_headings":"","what":"Write data to an xlsx file with additional features — write_xlsx_ext","title":"Write data to an xlsx file with additional features — write_xlsx_ext","text":"write_xlsx_ext() wraps wb_add_data_ext() provide equivalent openxlsx2::write_xlsx() better support sf labelled data. Arguments passed openxlsx2::wb_workbook() ignored x workbook instead data frame.","code":""},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/write_xlsx_ext.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write data to an xlsx file with additional features — write_xlsx_ext","text":"","code":"write_xlsx_ext( x, file = NULL, as_table = FALSE, ..., creator = NULL, title = NULL, subject = NULL, category = NULL, datetime_created = Sys.time(), theme = NULL, keywords = NULL, start_row = 1, overwrite = TRUE, geometry = c(\"drop\", \"coords\", \"wkt\"), labels = c(\"drop\", \"row_before\"), call = caller_env() )"},{"path":"https://elipousson.github.io/openxlsx2Extras/reference/write_xlsx_ext.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write data to an xlsx file with additional features — write_xlsx_ext","text":"x object list objects can handled wb_add_data() write file. file optional xlsx file name. file passed, object written disk workbook object returned. as_table TRUE, write data table, instead data. ... Arguments passed wb_workbook, wb_add_worksheet, wb_add_data_table, wb_add_data, wb_freeze_pane, wb_set_col_widths, wb_save creator Creator workbook (name). Defaults login username options(\"openxlsx2.creator\") set. sheet name new worksheet grid_lines logical. FALSE, worksheet grid lines hidden. tab_color Color sheet tab. wb_color(), valid color (belonging grDevices::colors()) valid hex color beginning \"#\". zoom sheet zoom level, numeric 10 400 percentage. (zoom value smaller 10 default 10.) total_row logical. default FALSE total row added. start_col vector specifying starting column write x . start_row vector specifying starting row write x . col_names TRUE, column names x written. row_names TRUE, row names x written. na.strings Value used replacing NA values x. Default looks options(openxlsx2.na.strings) set. Otherwise na_strings() uses special #N/value within workbook. first_active_row Top row active region first_active_col Furthest left column active region first_row TRUE, freezes first row (equivalent first_active_row = 2) first_col TRUE, freezes first column (equivalent first_active_col = 2) widths Width set cols specified column width \"auto\" automatic sizing. widths recycled length cols. openxlsx2 sets default width 8.43, standard spreadsheet software. See Details general information column widths. overwrite FALSE, overwrite file already exists. creator Creator workbook (name). Defaults login username options(\"openxlsx2.creator\") set. title, subject, category, keywords Additional workbook properties passed openxlsx2::wb_workbook(). Ignored (creator title) x workbook instead data frame. datetime_created time workbook created theme Optional theme identified string number. See Details options. start_row vector specifying starting row write x . overwrite FALSE, overwrite file already exists. geometry String, one \"drop\" (default), \"coords\", \"wkt\". labels Method handling column labels. \"drop\" (default) \"row_before\". \"row_before\", insert column labels row column names. call execution environment currently running function, e.g. caller_env(). function mentioned error messages source error. See call argument abort() information.","code":""}]