diff --git a/dev/LICENSE-text.html b/dev/LICENSE-text.html index 672e546c8..141c3c247 100644 --- a/dev/LICENSE-text.html +++ b/dev/LICENSE-text.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/articles/Update-from-openxlsx.html b/dev/articles/Update-from-openxlsx.html index 2226eb41a..ce9069a83 100644 --- a/dev/articles/Update-from-openxlsx.html +++ b/dev/articles/Update-from-openxlsx.html @@ -27,7 +27,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/articles/conditional-formatting.html b/dev/articles/conditional-formatting.html index 45c8f484a..3fdaffc9f 100644 --- a/dev/articles/conditional-formatting.html +++ b/dev/articles/conditional-formatting.html @@ -27,7 +27,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/articles/index.html b/dev/articles/index.html index 95815696a..6071b7f69 100644 --- a/dev/articles/index.html +++ b/dev/articles/index.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/articles/openxlsx2.html b/dev/articles/openxlsx2.html index eed0eb9a2..f82667361 100644 --- a/dev/articles/openxlsx2.html +++ b/dev/articles/openxlsx2.html @@ -27,7 +27,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/articles/openxlsx2_charts_manual.html b/dev/articles/openxlsx2_charts_manual.html index d1b8ec7c0..b0c3158bc 100644 --- a/dev/articles/openxlsx2_charts_manual.html +++ b/dev/articles/openxlsx2_charts_manual.html @@ -27,7 +27,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/articles/openxlsx2_formulas_manual.html b/dev/articles/openxlsx2_formulas_manual.html index c4546d6cc..91caf377d 100644 --- a/dev/articles/openxlsx2_formulas_manual.html +++ b/dev/articles/openxlsx2_formulas_manual.html @@ -27,7 +27,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/articles/openxlsx2_read_to_df.html b/dev/articles/openxlsx2_read_to_df.html index c5253d05e..367b03d61 100644 --- a/dev/articles/openxlsx2_read_to_df.html +++ b/dev/articles/openxlsx2_read_to_df.html @@ -27,7 +27,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/articles/openxlsx2_style_manual.html b/dev/articles/openxlsx2_style_manual.html index f9c4edd37..041a1f6b9 100644 --- a/dev/articles/openxlsx2_style_manual.html +++ b/dev/articles/openxlsx2_style_manual.html @@ -27,7 +27,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/authors.html b/dev/authors.html index 2b5e7ae3d..af1d80185 100644 --- a/dev/authors.html +++ b/dev/authors.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 @@ -86,11 +86,11 @@ Authors Citation Source: inst/CITATION - (2024). openxlsx2: Read, Write and Edit 'xlsx' Files. R package version 1.6.0.9000. URL https://github.com/JanMarvin/openxlsx2. + (2024). openxlsx2: Read, Write and Edit 'xlsx' Files. R package version 1.7.0.9000. URL https://github.com/JanMarvin/openxlsx2. @Manual{, title = {openxlsx2: Read, Write and Edit 'xlsx' Files}, year = {2024}, - note = {R package version 1.6.0.9000}, + note = {R package version 1.7.0.9000}, url = {https://janmarvin.github.io/openxlsx2/}, } diff --git a/dev/index.html b/dev/index.html index e8311a474..4f1c0812f 100644 --- a/dev/index.html +++ b/dev/index.html @@ -27,7 +27,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/news/index.html b/dev/news/index.html index 89ab14aea..f70e61570 100644 --- a/dev/news/index.html +++ b/dev/news/index.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 @@ -60,15 +60,18 @@ openxlsx2 (development version) + + +openxlsx2 1.7CRAN release: 2024-06-02 -New features +New features Add function to remove conditional formatting from worksheet wb_remove_conditional_formatting() 1011 Silence a warning triggered by a folder called "[trash]". 1012 Initial support for pivot table timelines. 1016 Add wb_add_timeline() and extend wb_add_slicer(). 1017 -Fixes +Fixes Fixed an issue with non consecutive dims, where columns or rows were silently dropped. 1015 Fixes to wb_clone_worksheet() cloning drawings and images should be restored. 1016 Fixed an issue where non consecutive columns with special types would overlap. If columns A and C were dates, column B would be formatted as date too. 1026 diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index 51e75d941..cef2af83b 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -9,7 +9,7 @@ articles: openxlsx2_style_manual: openxlsx2_style_manual.html openxlsx2: openxlsx2.html Update-from-openxlsx: Update-from-openxlsx.html -last_built: 2024-06-02T09:28Z +last_built: 2024-06-05T17:00Z urls: reference: https://janmarvin.github.io/openxlsx2/reference article: https://janmarvin.github.io/openxlsx2/articles diff --git a/dev/reference/active_sheet-wb.html b/dev/reference/active_sheet-wb.html index 8219d6205..23be81748 100644 --- a/dev/reference/active_sheet-wb.html +++ b/dev/reference/active_sheet-wb.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/as_xml.html b/dev/reference/as_xml.html index 1b8ca12aa..57c0fd1f3 100644 --- a/dev/reference/as_xml.html +++ b/dev/reference/as_xml.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/base_font-wb.html b/dev/reference/base_font-wb.html index 14cf175ff..01ca713fb 100644 --- a/dev/reference/base_font-wb.html +++ b/dev/reference/base_font-wb.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/clean_worksheet_name.html b/dev/reference/clean_worksheet_name.html index f301b1782..967d5ab36 100644 --- a/dev/reference/clean_worksheet_name.html +++ b/dev/reference/clean_worksheet_name.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/col2int.html b/dev/reference/col2int.html index 3dc4af139..fb6d6e245 100644 --- a/dev/reference/col2int.html +++ b/dev/reference/col2int.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/col_widths-wb.html b/dev/reference/col_widths-wb.html index accfad46a..7a5ef8ca1 100644 --- a/dev/reference/col_widths-wb.html +++ b/dev/reference/col_widths-wb.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/comment_internal.html b/dev/reference/comment_internal.html index 5a9af5e5c..3c528a41a 100644 --- a/dev/reference/comment_internal.html +++ b/dev/reference/comment_internal.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/con_dims.html b/dev/reference/con_dims.html index a21de7f21..66231a81e 100644 --- a/dev/reference/con_dims.html +++ b/dev/reference/con_dims.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/con_rng.html b/dev/reference/con_rng.html index 1bf1f21cb..3cf20da04 100644 --- a/dev/reference/con_rng.html +++ b/dev/reference/con_rng.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/convertToExcelDate.html b/dev/reference/convertToExcelDate.html index 49d67af26..47eef62e5 100644 --- a/dev/reference/convertToExcelDate.html +++ b/dev/reference/convertToExcelDate.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/convert_date.html b/dev/reference/convert_date.html index d691e78f9..33982f89d 100644 --- a/dev/reference/convert_date.html +++ b/dev/reference/convert_date.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/convert_to_excel_date.html b/dev/reference/convert_to_excel_date.html index 938ee2901..fb7bcd045 100644 --- a/dev/reference/convert_to_excel_date.html +++ b/dev/reference/convert_to_excel_date.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/create_border.html b/dev/reference/create_border.html index 3fc00ffb2..fca10b586 100644 --- a/dev/reference/create_border.html +++ b/dev/reference/create_border.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/create_cell_style.html b/dev/reference/create_cell_style.html index f56b47add..9352993d4 100644 --- a/dev/reference/create_cell_style.html +++ b/dev/reference/create_cell_style.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/create_colors_xml.html b/dev/reference/create_colors_xml.html index dfe20c1ec..e13489018 100644 --- a/dev/reference/create_colors_xml.html +++ b/dev/reference/create_colors_xml.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/create_comment.html b/dev/reference/create_comment.html index 1e32afa54..fdd3f0ec8 100644 --- a/dev/reference/create_comment.html +++ b/dev/reference/create_comment.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/create_dxfs_style.html b/dev/reference/create_dxfs_style.html index 775970fdd..3e077aad0 100644 --- a/dev/reference/create_dxfs_style.html +++ b/dev/reference/create_dxfs_style.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/create_fill.html b/dev/reference/create_fill.html index 0ee9afad9..0fde107f8 100644 --- a/dev/reference/create_fill.html +++ b/dev/reference/create_fill.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/create_font.html b/dev/reference/create_font.html index cca327b1d..5537d1de2 100644 --- a/dev/reference/create_font.html +++ b/dev/reference/create_font.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/create_hyperlink.html b/dev/reference/create_hyperlink.html index fda7f4f5c..3d8f7ce41 100644 --- a/dev/reference/create_hyperlink.html +++ b/dev/reference/create_hyperlink.html @@ -16,7 +16,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/create_numfmt.html b/dev/reference/create_numfmt.html index 0a9a00c21..8b4ebd5e2 100644 --- a/dev/reference/create_numfmt.html +++ b/dev/reference/create_numfmt.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/create_sparklines.html b/dev/reference/create_sparklines.html index b3f84c59b..9e2d16a3e 100644 --- a/dev/reference/create_sparklines.html +++ b/dev/reference/create_sparklines.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/create_tablestyle.html b/dev/reference/create_tablestyle.html index ab5f24b6d..c2ec2f21e 100644 --- a/dev/reference/create_tablestyle.html +++ b/dev/reference/create_tablestyle.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/creators-wb.html b/dev/reference/creators-wb.html index 49b00811e..b5e412659 100644 --- a/dev/reference/creators-wb.html +++ b/dev/reference/creators-wb.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/dataframe_to_dims.html b/dev/reference/dataframe_to_dims.html index 42bccfa91..f924b008d 100644 --- a/dev/reference/dataframe_to_dims.html +++ b/dev/reference/dataframe_to_dims.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/delete_data.html b/dev/reference/delete_data.html index 505c15abd..8fb2b79ac 100644 --- a/dev/reference/delete_data.html +++ b/dev/reference/delete_data.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/dims_helper.html b/dev/reference/dims_helper.html index fb2193308..2b30da17b 100644 --- a/dev/reference/dims_helper.html +++ b/dev/reference/dims_helper.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/dims_to_dataframe.html b/dev/reference/dims_to_dataframe.html index 32039dafd..00aa10557 100644 --- a/dev/reference/dims_to_dataframe.html +++ b/dev/reference/dims_to_dataframe.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/filter-wb.html b/dev/reference/filter-wb.html index b5fc4e93b..51c003792 100644 --- a/dev/reference/filter-wb.html +++ b/dev/reference/filter-wb.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/fmt_txt.html b/dev/reference/fmt_txt.html index a59ac8c65..23a13664a 100644 --- a/dev/reference/fmt_txt.html +++ b/dev/reference/fmt_txt.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/grouping-wb.html b/dev/reference/grouping-wb.html index 10c88b536..5e9319384 100644 --- a/dev/reference/grouping-wb.html +++ b/dev/reference/grouping-wb.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/index.html b/dev/reference/index.html index 5fee31891..11aab6c5d 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/int2col.html b/dev/reference/int2col.html index a1049109e..62d26ef37 100644 --- a/dev/reference/int2col.html +++ b/dev/reference/int2col.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/named_region-wb.html b/dev/reference/named_region-wb.html index 2b432d2b9..7d4713850 100644 --- a/dev/reference/named_region-wb.html +++ b/dev/reference/named_region-wb.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/openxlsx2-deprecated.html b/dev/reference/openxlsx2-deprecated.html index b44295e9f..3b454991a 100644 --- a/dev/reference/openxlsx2-deprecated.html +++ b/dev/reference/openxlsx2-deprecated.html @@ -16,7 +16,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/openxlsx2-package.html b/dev/reference/openxlsx2-package.html index 0dea63a81..157aedaa7 100644 --- a/dev/reference/openxlsx2-package.html +++ b/dev/reference/openxlsx2-package.html @@ -18,7 +18,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/openxlsx2_options.html b/dev/reference/openxlsx2_options.html index 851362efc..9088791e6 100644 --- a/dev/reference/openxlsx2_options.html +++ b/dev/reference/openxlsx2_options.html @@ -70,7 +70,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/person-wb.html b/dev/reference/person-wb.html index af31d80c2..013a83244 100644 --- a/dev/reference/person-wb.html +++ b/dev/reference/person-wb.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/pipe.html b/dev/reference/pipe.html index 7dd68197f..a6dcbb154 100644 --- a/dev/reference/pipe.html +++ b/dev/reference/pipe.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/print.pugi_xml.html b/dev/reference/print.pugi_xml.html index 335c26f58..5d79f3d11 100644 --- a/dev/reference/print.pugi_xml.html +++ b/dev/reference/print.pugi_xml.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/properties-wb.html b/dev/reference/properties-wb.html index 911e180f4..1e70f76ce 100644 --- a/dev/reference/properties-wb.html +++ b/dev/reference/properties-wb.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 @@ -153,7 +153,7 @@ Exampleswb$set_properties(title = "my title") wb$get_properties() #> creator modifier datetime_created -#> "Jan Marvin Garbuszus" "Jan Marvin Garbuszus" "2024-06-02T09:29:03Z" +#> "Jan Marvin Garbuszus" "Jan Marvin Garbuszus" "2024-06-05T17:01:09Z" #> datetime_modified title company #> "2023-05-29T10:47:37Z" "my title" "" diff --git a/dev/reference/pugixml.html b/dev/reference/pugixml.html index ad56f745c..1a8116b5f 100644 --- a/dev/reference/pugixml.html +++ b/dev/reference/pugixml.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/read_xml.html b/dev/reference/read_xml.html index 2ec904937..6b971a87b 100644 --- a/dev/reference/read_xml.html +++ b/dev/reference/read_xml.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/row_heights-wb.html b/dev/reference/row_heights-wb.html index 0acd43089..d96963b32 100644 --- a/dev/reference/row_heights-wb.html +++ b/dev/reference/row_heights-wb.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/sheet_names-wb.html b/dev/reference/sheet_names-wb.html index 1d6af60ba..fdb76b50a 100644 --- a/dev/reference/sheet_names-wb.html +++ b/dev/reference/sheet_names-wb.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/sheet_visibility-wb.html b/dev/reference/sheet_visibility-wb.html index 2c9775163..b579a7b9f 100644 --- a/dev/reference/sheet_visibility-wb.html +++ b/dev/reference/sheet_visibility-wb.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/styles_on_sheet.html b/dev/reference/styles_on_sheet.html index 4174d40a4..033336739 100644 --- a/dev/reference/styles_on_sheet.html +++ b/dev/reference/styles_on_sheet.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/temp_xlsx.html b/dev/reference/temp_xlsx.html index ca1223171..4a90ef55e 100644 --- a/dev/reference/temp_xlsx.html +++ b/dev/reference/temp_xlsx.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/waivers.html b/dev/reference/waivers.html index d4bee363f..068b5efb9 100644 --- a/dev/reference/waivers.html +++ b/dev/reference/waivers.html @@ -22,7 +22,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wbWorkbook.html b/dev/reference/wbWorkbook.html index 2e10d0863..1c026c323 100644 --- a/dev/reference/wbWorkbook.html +++ b/dev/reference/wbWorkbook.html @@ -82,7 +82,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_border.html b/dev/reference/wb_add_border.html index 17d00733e..26b9ece85 100644 --- a/dev/reference/wb_add_border.html +++ b/dev/reference/wb_add_border.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_cell_style.html b/dev/reference/wb_add_cell_style.html index 73e73da69..78848b863 100644 --- a/dev/reference/wb_add_cell_style.html +++ b/dev/reference/wb_add_cell_style.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_chart_xml.html b/dev/reference/wb_add_chart_xml.html index 2e0063f11..90930b509 100644 --- a/dev/reference/wb_add_chart_xml.html +++ b/dev/reference/wb_add_chart_xml.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_chartsheet.html b/dev/reference/wb_add_chartsheet.html index 6d4a6255c..96ecb0153 100644 --- a/dev/reference/wb_add_chartsheet.html +++ b/dev/reference/wb_add_chartsheet.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_comment.html b/dev/reference/wb_add_comment.html index 07f0af4b0..7e2c300f6 100644 --- a/dev/reference/wb_add_comment.html +++ b/dev/reference/wb_add_comment.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_conditional_formatting.html b/dev/reference/wb_add_conditional_formatting.html index f8f4ef14f..63e3c801d 100644 --- a/dev/reference/wb_add_conditional_formatting.html +++ b/dev/reference/wb_add_conditional_formatting.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_data.html b/dev/reference/wb_add_data.html index a862da672..c6431fd40 100644 --- a/dev/reference/wb_add_data.html +++ b/dev/reference/wb_add_data.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_data_table.html b/dev/reference/wb_add_data_table.html index 35e7514d2..78df371ef 100644 --- a/dev/reference/wb_add_data_table.html +++ b/dev/reference/wb_add_data_table.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_data_validation.html b/dev/reference/wb_add_data_validation.html index fd4410422..0baca23a1 100644 --- a/dev/reference/wb_add_data_validation.html +++ b/dev/reference/wb_add_data_validation.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_drawing.html b/dev/reference/wb_add_drawing.html index 618086ca6..2f87c9c47 100644 --- a/dev/reference/wb_add_drawing.html +++ b/dev/reference/wb_add_drawing.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_dxfs_style.html b/dev/reference/wb_add_dxfs_style.html index da9e23d96..c3449c004 100644 --- a/dev/reference/wb_add_dxfs_style.html +++ b/dev/reference/wb_add_dxfs_style.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_fill.html b/dev/reference/wb_add_fill.html index 776c108af..d94154ea6 100644 --- a/dev/reference/wb_add_fill.html +++ b/dev/reference/wb_add_fill.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_font.html b/dev/reference/wb_add_font.html index b57f2f198..40651a0e3 100644 --- a/dev/reference/wb_add_font.html +++ b/dev/reference/wb_add_font.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_form_control.html b/dev/reference/wb_add_form_control.html index 24c5e50c6..3975c10bc 100644 --- a/dev/reference/wb_add_form_control.html +++ b/dev/reference/wb_add_form_control.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_formula.html b/dev/reference/wb_add_formula.html index 25d3bda94..316dcac53 100644 --- a/dev/reference/wb_add_formula.html +++ b/dev/reference/wb_add_formula.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_ignore_error.html b/dev/reference/wb_add_ignore_error.html index d266c0117..bda2ee3e0 100644 --- a/dev/reference/wb_add_ignore_error.html +++ b/dev/reference/wb_add_ignore_error.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_image.html b/dev/reference/wb_add_image.html index 3b89aaa60..dd4b0ab8a 100644 --- a/dev/reference/wb_add_image.html +++ b/dev/reference/wb_add_image.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_mips.html b/dev/reference/wb_add_mips.html index 1347ded1f..ee2e14443 100644 --- a/dev/reference/wb_add_mips.html +++ b/dev/reference/wb_add_mips.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_mschart.html b/dev/reference/wb_add_mschart.html index ccde86c34..5daf2c805 100644 --- a/dev/reference/wb_add_mschart.html +++ b/dev/reference/wb_add_mschart.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_named_style.html b/dev/reference/wb_add_named_style.html index a202bbe5a..da98fab85 100644 --- a/dev/reference/wb_add_named_style.html +++ b/dev/reference/wb_add_named_style.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_numfmt.html b/dev/reference/wb_add_numfmt.html index 591d75673..d82e2b046 100644 --- a/dev/reference/wb_add_numfmt.html +++ b/dev/reference/wb_add_numfmt.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_page_break.html b/dev/reference/wb_add_page_break.html index 750333417..1ba9042f0 100644 --- a/dev/reference/wb_add_page_break.html +++ b/dev/reference/wb_add_page_break.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_pivot_table.html b/dev/reference/wb_add_pivot_table.html index 7e368e879..236325c68 100644 --- a/dev/reference/wb_add_pivot_table.html +++ b/dev/reference/wb_add_pivot_table.html @@ -16,7 +16,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_plot.html b/dev/reference/wb_add_plot.html index 1bc377ab4..b8f42035a 100644 --- a/dev/reference/wb_add_plot.html +++ b/dev/reference/wb_add_plot.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_slicer.html b/dev/reference/wb_add_slicer.html index 66e1bc527..6eeaafcbd 100644 --- a/dev/reference/wb_add_slicer.html +++ b/dev/reference/wb_add_slicer.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_sparklines.html b/dev/reference/wb_add_sparklines.html index 82155247e..52f12a8e4 100644 --- a/dev/reference/wb_add_sparklines.html +++ b/dev/reference/wb_add_sparklines.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_style.html b/dev/reference/wb_add_style.html index 00395e0d9..5f18f8ec4 100644 --- a/dev/reference/wb_add_style.html +++ b/dev/reference/wb_add_style.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_thread.html b/dev/reference/wb_add_thread.html index 0e5b53624..82a47a4a9 100644 --- a/dev/reference/wb_add_thread.html +++ b/dev/reference/wb_add_thread.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_add_worksheet.html b/dev/reference/wb_add_worksheet.html index e3a613644..ee1af5f54 100644 --- a/dev/reference/wb_add_worksheet.html +++ b/dev/reference/wb_add_worksheet.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_base_colors.html b/dev/reference/wb_base_colors.html index b4c4a2791..67ddfdf48 100644 --- a/dev/reference/wb_base_colors.html +++ b/dev/reference/wb_base_colors.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_cell_style.html b/dev/reference/wb_cell_style.html index beae53b7a..401216bfe 100644 --- a/dev/reference/wb_cell_style.html +++ b/dev/reference/wb_cell_style.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_clean_sheet.html b/dev/reference/wb_clean_sheet.html index 8a96fae06..1dfb240f6 100644 --- a/dev/reference/wb_clean_sheet.html +++ b/dev/reference/wb_clean_sheet.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_clone_sheet_style.html b/dev/reference/wb_clone_sheet_style.html index 1143d8a1a..95b0b2998 100644 --- a/dev/reference/wb_clone_sheet_style.html +++ b/dev/reference/wb_clone_sheet_style.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_clone_worksheet.html b/dev/reference/wb_clone_worksheet.html index dae2a3967..972ddc92b 100644 --- a/dev/reference/wb_clone_worksheet.html +++ b/dev/reference/wb_clone_worksheet.html @@ -28,7 +28,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_color.html b/dev/reference/wb_color.html index 986ef622b..1642cd89f 100644 --- a/dev/reference/wb_color.html +++ b/dev/reference/wb_color.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_comment.html b/dev/reference/wb_comment.html index 7bcea2c32..98ec783b8 100644 --- a/dev/reference/wb_comment.html +++ b/dev/reference/wb_comment.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_copy_cells.html b/dev/reference/wb_copy_cells.html index 759bb63a4..889864918 100644 --- a/dev/reference/wb_copy_cells.html +++ b/dev/reference/wb_copy_cells.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_data.html b/dev/reference/wb_data.html index c6f2690a4..96aa22735 100644 --- a/dev/reference/wb_data.html +++ b/dev/reference/wb_data.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_dims.html b/dev/reference/wb_dims.html index 330b9b96a..4c4d7a34d 100644 --- a/dev/reference/wb_dims.html +++ b/dev/reference/wb_dims.html @@ -22,7 +22,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_freeze_pane.html b/dev/reference/wb_freeze_pane.html index c70b3b46f..d84040829 100644 --- a/dev/reference/wb_freeze_pane.html +++ b/dev/reference/wb_freeze_pane.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_get_tables.html b/dev/reference/wb_get_tables.html index e2197cec8..b3deddf46 100644 --- a/dev/reference/wb_get_tables.html +++ b/dev/reference/wb_get_tables.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_load.html b/dev/reference/wb_load.html index 9a60dc1c3..b4af1d757 100644 --- a/dev/reference/wb_load.html +++ b/dev/reference/wb_load.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_merge_cells.html b/dev/reference/wb_merge_cells.html index e9451e3f7..45992fa20 100644 --- a/dev/reference/wb_merge_cells.html +++ b/dev/reference/wb_merge_cells.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_open.html b/dev/reference/wb_open.html index 2f60aac63..0fe7d9b10 100644 --- a/dev/reference/wb_open.html +++ b/dev/reference/wb_open.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_order.html b/dev/reference/wb_order.html index a73c730ef..311851214 100644 --- a/dev/reference/wb_order.html +++ b/dev/reference/wb_order.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_page_setup.html b/dev/reference/wb_page_setup.html index 2f58141b0..f20b38dfd 100644 --- a/dev/reference/wb_page_setup.html +++ b/dev/reference/wb_page_setup.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_protect.html b/dev/reference/wb_protect.html index a2d9dbfe1..c3993e905 100644 --- a/dev/reference/wb_protect.html +++ b/dev/reference/wb_protect.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_protect_worksheet.html b/dev/reference/wb_protect_worksheet.html index 108dac823..963492e52 100644 --- a/dev/reference/wb_protect_worksheet.html +++ b/dev/reference/wb_protect_worksheet.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_remove_tables.html b/dev/reference/wb_remove_tables.html index 12c95e38e..92ad3e943 100644 --- a/dev/reference/wb_remove_tables.html +++ b/dev/reference/wb_remove_tables.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_remove_worksheet.html b/dev/reference/wb_remove_worksheet.html index 2f88a49d2..1f05d3c99 100644 --- a/dev/reference/wb_remove_worksheet.html +++ b/dev/reference/wb_remove_worksheet.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_save.html b/dev/reference/wb_save.html index addef6cc8..5cdc200bd 100644 --- a/dev/reference/wb_save.html +++ b/dev/reference/wb_save.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_set_bookview.html b/dev/reference/wb_set_bookview.html index ce182d87a..061281a47 100644 --- a/dev/reference/wb_set_bookview.html +++ b/dev/reference/wb_set_bookview.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_set_grid_lines.html b/dev/reference/wb_set_grid_lines.html index a45967ec0..743a62d8f 100644 --- a/dev/reference/wb_set_grid_lines.html +++ b/dev/reference/wb_set_grid_lines.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_set_header_footer.html b/dev/reference/wb_set_header_footer.html index 83a8019d1..de95b26a9 100644 --- a/dev/reference/wb_set_header_footer.html +++ b/dev/reference/wb_set_header_footer.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_set_last_modified_by.html b/dev/reference/wb_set_last_modified_by.html index 77e0df431..2960ff87e 100644 --- a/dev/reference/wb_set_last_modified_by.html +++ b/dev/reference/wb_set_last_modified_by.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_set_sheetview.html b/dev/reference/wb_set_sheetview.html index fd8c73cf8..d76429c78 100644 --- a/dev/reference/wb_set_sheetview.html +++ b/dev/reference/wb_set_sheetview.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_to_df.html b/dev/reference/wb_to_df.html index 8fba72578..6f007647f 100644 --- a/dev/reference/wb_to_df.html +++ b/dev/reference/wb_to_df.html @@ -16,7 +16,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_update_table.html b/dev/reference/wb_update_table.html index d4e6f3c4f..6b87e741a 100644 --- a/dev/reference/wb_update_table.html +++ b/dev/reference/wb_update_table.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/wb_workbook.html b/dev/reference/wb_workbook.html index 4c00fd348..77ab0f0c5 100644 --- a/dev/reference/wb_workbook.html +++ b/dev/reference/wb_workbook.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/write_data.html b/dev/reference/write_data.html index d77d4db76..700785df6 100644 --- a/dev/reference/write_data.html +++ b/dev/reference/write_data.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/write_datatable.html b/dev/reference/write_datatable.html index f286dbb00..a7bfae7aa 100644 --- a/dev/reference/write_datatable.html +++ b/dev/reference/write_datatable.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/write_formula.html b/dev/reference/write_formula.html index cc28ee58c..3a12bb330 100644 --- a/dev/reference/write_formula.html +++ b/dev/reference/write_formula.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/write_xlsx.html b/dev/reference/write_xlsx.html index 47032286e..9e533a0c3 100644 --- a/dev/reference/write_xlsx.html +++ b/dev/reference/write_xlsx.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/xl_open.html b/dev/reference/xl_open.html index bbee28c9d..09f2d151b 100644 --- a/dev/reference/xl_open.html +++ b/dev/reference/xl_open.html @@ -32,7 +32,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/xml_add_child.html b/dev/reference/xml_add_child.html index e84b33ec0..c3a96eea2 100644 --- a/dev/reference/xml_add_child.html +++ b/dev/reference/xml_add_child.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/xml_attr_mod.html b/dev/reference/xml_attr_mod.html index 7ba0ff83a..031213a8e 100644 --- a/dev/reference/xml_attr_mod.html +++ b/dev/reference/xml_attr_mod.html @@ -14,7 +14,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/xml_node_create.html b/dev/reference/xml_node_create.html index a928f2fce..0340f56a9 100644 --- a/dev/reference/xml_node_create.html +++ b/dev/reference/xml_node_create.html @@ -12,7 +12,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/reference/xml_rm_child.html b/dev/reference/xml_rm_child.html index d666d67bd..cc5358ce5 100644 --- a/dev/reference/xml_rm_child.html +++ b/dev/reference/xml_rm_child.html @@ -10,7 +10,7 @@ openxlsx2 - 1.6.0.9000 + 1.7.0.9000 diff --git a/dev/search.json b/dev/search.json index ef2c354ac..d13464ca0 100644 --- a/dev/search.json +++ b/dev/search.json @@ -1 +1 @@ -[{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/Update-from-openxlsx.html","id":"basic-read-and-write-functions","dir":"Articles","previous_headings":"","what":"Basic read and write functions","title":"Upgrade from openxlsx","text":"Welcome openxlsx2 update vignette. vignette take common code examples openxlsx show similar results can replicated openxlsx2. Thank taking look, let’s get started. previous openxlsx functions used . function calls, well camelCase, tried switch snake_case (still work progress, may still function arguments use camelCase).","code":""},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/Update-from-openxlsx.html","id":"read-xlsx-or-xlsm-files","dir":"Articles","previous_headings":"Basic read and write functions","what":"Read xlsx or xlsm files","title":"Upgrade from openxlsx","text":"basic read function changed read.xlsx read_xlsx. Using default xlsx file included package: old syntax looked like : changed : can see, return spreadsheet return codes (e.g., #NUM) openxlsx2. Another thing see , return cell row rowname data frame returned. openxlsx2 return data frame selected size, even empty. preferred openxlsx::readWorkbook() become wb_read(). wrappers newly introduced function wb_to_df() provides options. read_xlsx() wb_read() created backward comparability.","code":"file <- system.file(\"extdata\", \"openxlsx2_example.xlsx\", package = \"openxlsx2\") # read in openxlsx openxlsx::read.xlsx(xlsxFile = file) # read in openxlsx2 openxlsx2::read_xlsx(file = file) ## Var1 Var2 NA Var3 Var4 Var5 Var6 Var7 Var8 ## 3 TRUE 1 NA 1 a 2023-05-29 3209324 This #DIV/0! 01:27:15 ## 4 TRUE NA NA #NUM! b 2023-05-23 0 14:02:57 ## 5 TRUE 2 NA 1.34 c 2023-02-01 #VALUE! 23:01:02 ## 6 FALSE 2 NA #NUM! 2 17:24:53 ## 7 FALSE 3 NA 1.56 e ## 8 FALSE 1 NA 1.7 f 2023-03-02 2.7 08:45:58 ## 9 NA NA NA ## 10 FALSE 2 NA 23 h 2023-12-24 25 ## 11 FALSE 3 NA 67.3 i 2023-12-25 3 ## 12 NA 1 NA 123 2023-07-31 122 "},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/Update-from-openxlsx.html","id":"write-xlsx-files","dir":"Articles","previous_headings":"","what":"Write xlsx files","title":"Upgrade from openxlsx","text":"Basic writing openxlsx2 behaves identical openxlsx. Though aware overwrite optional parameter openxlsx2 just like functions like base::write.csv() write onto existing file name, file replaced. Setting output temporary xlsx file previous write function looks like : new function looks quite similar:","code":"output <- temp_xlsx() # write in openxlsx openxlsx::write.xlsx(iris, file = output, colNames = TRUE) # write in openxlsx2 openxlsx2::write_xlsx(iris, file = output, col_names = TRUE)"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/Update-from-openxlsx.html","id":"basic-workbook-functions","dir":"Articles","previous_headings":"","what":"Basic workbook functions","title":"Upgrade from openxlsx","text":"Workbook functions renamed begin wb_ plenty package, therefore looking man pages seems fastest way. Yet, begins loading workbook.","code":""},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/Update-from-openxlsx.html","id":"loading-a-workbook","dir":"Articles","previous_headings":"Basic workbook functions","what":"Loading a workbook","title":"Upgrade from openxlsx","text":"major feature openxlsx workbooks. Obviously remain central piece openxlsx2. Previous load : openxlsx2 loading changed : plenty functions interact workbooks describe every single one . detailed list can found references","code":"wb <- openxlsx::loadWorkbook(file = file) wb <- wb_load(file = file)"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/Update-from-openxlsx.html","id":"styles","dir":"Articles","previous_headings":"Basic workbook functions","what":"Styles","title":"Upgrade from openxlsx","text":"One biggest user facing change removal stylesObject. following section use code openxlsx::addStyle() openxlsx2 code looks something like : code uses chaining. prefer piping, provide chained functions prefix wb_ wb_add_worksheet(), wb_add_data(), wb_add_border() wb_set_col_widths() functions use pipes %>% |>. pipes code becomes aware chains modify object place pipes . can re-use styles wb_get_cell_style() wb_set_cell_style(). Abandoning stylesObject openxlsx2 huge benefit can import export spreadsheet without changing cell style. still possible modify cell style wb_add_border(), wb_add_fill(), wb_add_font() wb_add_numfmt(). Additional examples regarding styles can found styles vignette.","code":"# openxlsx ## Create a new workbook wb <- createWorkbook(creator = \"My name here\") addWorksheet(wb, \"Expenditure\", gridLines = FALSE) writeData(wb, sheet = 1, USPersonalExpenditure, rowNames = TRUE) ## style for body bodyStyle <- createStyle(border = \"TopBottom\", borderColor = \"#4F81BD\") addStyle(wb, sheet = 1, bodyStyle, rows = 2:6, cols = 1:6, gridExpand = TRUE) ## set column width for row names column setColWidths(wb, 1, cols = 1, widths = 21) # openxlsx2 chained border_color <- wb_color(hex = \"4F81BD\") wb <- wb_workbook(creator = \"My name here\")$ add_worksheet(\"Expenditure\", grid_lines = FALSE)$ add_data(x = USPersonalExpenditure, row_names = TRUE)$ add_border( # add the outer and inner border dims = \"A1:F6\", top_border = \"thin\", top_color = border_color, bottom_border = \"thin\", bottom_color = border_color, inner_hgrid = \"thin\", inner_hcolor = border_color, left_border = \"\", right_border = \"\" )$ set_col_widths( # set column width cols = 1:6, widths = c(20, rep(10, 5)) )$ # remove the value in A1 add_data(dims = \"A1\", x = \"\") # openxlsx2 with pipes border_color <- wb_color(hex = \"4F81BD\") wb <- wb_workbook(creator = \"My name here\") %>% wb_add_worksheet(sheet = \"Expenditure\", grid_lines = FALSE) %>% wb_add_data(x = USPersonalExpenditure, row_names = TRUE) %>% wb_add_border( # add the outer and inner border dims = \"A1:F6\", top_border = \"thin\", top_color = border_color, bottom_border = \"thin\", bottom_color = border_color, inner_hgrid = \"thin\", inner_hcolor = border_color, left_border = \"\", right_border = \"\" ) %>% wb_set_col_widths( # set column width cols = 1:6, widths = c(20, rep(10, 5)) ) %>% # remove the value in A1 wb_add_data(dims = \"A1\", x = \"\") # openxlsx2 wbp <- wb_workbook() %>% wb_add_worksheet() wbc <- wb_workbook()$add_worksheet() # need to assign wbp wbp <- wbp %>% wb_add_data(x = iris) wbc$add_data(x = iris)"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/Update-from-openxlsx.html","id":"conditional-formatting","dir":"Articles","previous_headings":"Basic workbook functions","what":"Conditional formatting","title":"Upgrade from openxlsx","text":"See vignette(\"conditional-formatting\") extended examples formatting. minimal example:","code":"# openxlsx2 with chains wb <- wb_workbook()$ add_worksheet(\"a\")$ add_data(x = 1:4, col_names = FALSE)$ add_conditional_formatting(dims = \"A1:A4\", rule = \">2\") # openxlsx2 with pipes wb <- wb_workbook() %>% wb_add_worksheet(\"a\") %>% wb_add_data(x = 1:4, col_names = FALSE) %>% wb_add_conditional_formatting(dims = \"A1:A4\", rule = \">2\")"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/Update-from-openxlsx.html","id":"data-validation","dir":"Articles","previous_headings":"Basic workbook functions","what":"Data validation","title":"Upgrade from openxlsx","text":"Similarly, data validation updated improved. openxlsx code data validation looks openxlsx2 something like :","code":"# openxlsx wb <- createWorkbook() addWorksheet(wb, \"Sheet 1\") writeDataTable(wb, 1, x = iris[1:30, ]) dataValidation(wb, 1, col = 1:3, rows = 2:31, type = \"whole\", operator = \"between\", value = c(1, 9) ) # openxlsx2 with chains wb <- wb_workbook()$ add_worksheet(\"Sheet 1\")$ add_data_table(1, x = iris[1:30, ])$ add_data_validation(1, dims = wb_dims(rows = 2:31, cols = 1:3), # alternatively, dims can also be \"A2:C31\" if you know the span in your Excel workbook. type = \"whole\", operator = \"between\", value = c(1, 9) ) # openxlsx2 with pipes wb <- wb_workbook() %>% wb_add_worksheet(\"Sheet 1\") %>% wb_add_data_table(1, x = iris[1:30, ]) %>% wb_add_data_validation( sheet = 1, dims = \"A2:C31\", # alternatively, dims = wb_dims(rows = 2:31, cols = 1:3) type = \"whole\", operator = \"between\", value = c(1, 9) )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/Update-from-openxlsx.html","id":"saving","dir":"Articles","previous_headings":"Basic workbook functions","what":"Saving","title":"Upgrade from openxlsx","text":"Saving switched saveWorkbook() wb_save() opening workbook switched openXL() wb_open().","code":""},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/Update-from-openxlsx.html","id":"why-openxlsx2","dir":"Articles","previous_headings":"","what":"Why openxlsx2?","title":"Upgrade from openxlsx","text":"Originally, openxlsx2 started private branch openxlsx include pugixml library provide fully functional XML parser openxlsx. time, became clear home-written openxlsx XML parser limited ability reliably parse XML files, leading problems broken unreadable xlsx files. inclusion pugixml addressed, new internal structure created, structure required changes old openxlsx functions. accompanied change methods R6 possibility chaining piping functions. Working styles object openxlsx became clear great idea, work well enough needs files loaded modified openxlsx never look . always things look little style objects work perfectly. Likewise, lot edge cases openxlsx assume file structure xlsx objects simplified approximation actually going . example, openxlsx assumes sheet accompanied drawing. works many cases, match definition format openxml standard. may worksheets multiple drawings, drawing folder drawings included. Unfortunately, many things deeply embedded openxlsx code, development took place openxlsx2, things differed fork origin. point fork called independent project previously privately developed branch made public. say went hand hand modification actual project goal. , creating similar looking xlsx file able partially edit . Now writing identical xlsx file just able change everything. Since internal functions openxlsx cleaned , fixed mostly rewritten. package developed new ways handle styles styles manager, provides full range style options hard impossible include openxlsx. included support native graphs mschart feature creation pivot tables. support conditional formatting options, improved support data validation, sparklines form control objects. addition many quirks old package ironed . switched consistent stable API build dims provide multiple vignettes document code plenty functions interact openxml format. provide basic xlsb support msoc created package encrypt decrypt openxml files.","code":""},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/Update-from-openxlsx.html","id":"invitation-to-contribute","dir":"Articles","previous_headings":"","what":"Invitation to contribute","title":"Upgrade from openxlsx","text":"put lot work openxls2 make useful needs, improving found useful openxlsx removing didn’t need. claim omniscient things can spreadsheet software, claim omniscient things can openxlsx2. package still active development, though reached semi stable API change next major release. quite fond little package invite others try comment like course think missing something doesn’t work. openxlsx2 complex piece software certainly work bug-free, even best. want contribute development openxlsx2, please guest Github. Join open discussion, post fix issues write us mail.","code":""},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"rule-applies-to-all-each-cell-in-range","dir":"Articles","previous_headings":"","what":"Rule applies to all each cell in range","title":"Add conditional formatting to a workbook","text":"","code":"wb$add_worksheet(\"cellIs\") wb$add_data(\"cellIs\", -5:5) wb$add_data(\"cellIs\", LETTERS[1:11], start_col = 2) wb$add_conditional_formatting( \"cellIs\", dims = \"A1:A11\", rule = \"!=0\", style = \"negStyle\" ) wb$add_conditional_formatting( \"cellIs\", dims = \"A1:A11\", rule = \"==0\", style = \"posStyle\" )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"highlight-row-dependent-on-first-cell-in-row","dir":"Articles","previous_headings":"","what":"Highlight row dependent on first cell in row","title":"Add conditional formatting to a workbook","text":"","code":"wb$add_worksheet(\"Moving Row\") wb$add_data(\"Moving Row\", -5:5) wb$add_data(\"Moving Row\", LETTERS[1:11], start_col = 2) wb$add_conditional_formatting( \"Moving Row\", dims = \"A1:B11\", rule = \"$A1<0\", style = \"negStyle\" ) wb$add_conditional_formatting( \"Moving Row\", dims = \"A1:B11\", rule = \"$A1>0\", style = \"posStyle\" )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"highlight-column-dependent-on-first-cell-in-column","dir":"Articles","previous_headings":"","what":"Highlight column dependent on first cell in column","title":"Add conditional formatting to a workbook","text":"","code":"wb$add_worksheet(\"Moving Col\") wb$add_data(\"Moving Col\", -5:5) wb$add_data(\"Moving Col\", LETTERS[1:11], start_col = 2) wb$add_conditional_formatting( \"Moving Col\", dims = \"A1:B11\", rule = \"A$1<0\", style = \"negStyle\" ) wb$add_conditional_formatting( \"Moving Col\", dims = \"A1:B11\", rule = \"A$1>0\", style = \"posStyle\" )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"highlight-entire-range-cols-x-rows-dependent-only-on-cell-a1","dir":"Articles","previous_headings":"","what":"Highlight entire range cols X rows dependent only on cell A1","title":"Add conditional formatting to a workbook","text":"","code":"wb$add_worksheet(\"Dependent on\") wb$add_data(\"Dependent on\", -5:5) wb$add_data(\"Dependent on\", LETTERS[1:11], start_col = 2) wb$add_conditional_formatting( \"Dependent on\", dims = \"A1:B11\", rule = \"$A$1 < 0\", style = \"negStyle\" ) wb$add_conditional_formatting( \"Dependent on\", dims = \"A1:B11\", rule = \"$A$1>0\", style = \"posStyle\" )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"highlight-cells-in-column-1-based-on-value-in-column-2","dir":"Articles","previous_headings":"","what":"Highlight cells in column 1 based on value in column 2","title":"Add conditional formatting to a workbook","text":"","code":"wb$add_data(\"Dependent on\", data.frame(x = 1:10, y = runif(10)), startRow = 15) wb$add_conditional_formatting( \"Dependent on\", dims = \"A16:A25\", rule = \"B16<0.5\", style = \"negStyle\" ) wb$add_conditional_formatting( \"Dependent on\", dims = \"A16:A25\", rule = \"B16>=0.5\", style = \"posStyle\" )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"highlight-duplicates-using-default-style","dir":"Articles","previous_headings":"","what":"Highlight duplicates using default style","title":"Add conditional formatting to a workbook","text":"","code":"wb$add_worksheet(\"Duplicates\") wb$add_data(\"Duplicates\", sample(LETTERS[1:15], size = 10, replace = TRUE)) wb$add_conditional_formatting( \"Duplicates\", dims = \"A1:A10\", type = \"duplicatedValues\" )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"cells-containing-text","dir":"Articles","previous_headings":"","what":"Cells containing text","title":"Add conditional formatting to a workbook","text":"","code":"fn <- function(x) paste(sample(LETTERS, 10), collapse = \"-\") wb$add_worksheet(\"containsText\") wb$add_data(\"containsText\", sapply(1:10, fn)) wb$add_conditional_formatting( \"containsText\", dims = \"A1:A10\", type = \"containsText\", rule = \"A\" )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"cells-not-containing-text","dir":"Articles","previous_headings":"","what":"Cells not containing text","title":"Add conditional formatting to a workbook","text":"","code":"fn <- function(x) paste(sample(LETTERS, 10), collapse = \"-\") my_dat <- sapply(1:10, fn) wb$add_worksheet(\"notcontainsText\") wb$add_data(\"notcontainsText\", x = my_dat) wb$add_conditional_formatting( \"notcontainsText\", dims = wb_dims(x = my_dat), type = \"notContainsText\", rule = \"A\" )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"cells-begins-with-text","dir":"Articles","previous_headings":"","what":"Cells begins with text","title":"Add conditional formatting to a workbook","text":"","code":"fn <- function(x) paste(sample(LETTERS, 10), collapse = \"-\") wb$add_worksheet(\"beginsWith\") wb$add_data(\"beginsWith\", sapply(1:100, fn)) wb$add_conditional_formatting( \"beginsWith\", dims = \"A1:A100\", type = \"beginsWith\", rule = \"A\" )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"cells-ends-with-text","dir":"Articles","previous_headings":"","what":"Cells ends with text","title":"Add conditional formatting to a workbook","text":"","code":"fn <- function(x) paste(sample(LETTERS, 10), collapse = \"-\") wb$add_worksheet(\"endsWith\") wb$add_data(\"endsWith\", x = sapply(1:100, fn)) wb$add_conditional_formatting( \"endsWith\", dims = \"A1:A100\", type = \"endsWith\", rule = \"A\" )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"colorscale-colors-cells-based-on-cell-value","dir":"Articles","previous_headings":"","what":"Colorscale colors cells based on cell value","title":"Add conditional formatting to a workbook","text":"Yep, color scale image. Rule vector colors length 2 3 (hex color colors()). rule NULL, min max cells used. Rule must length style L.","code":"df <- read_xlsx(\"https://github.com/JanMarvin/openxlsx-data/raw/main/readTest.xlsx\", sheet = 5) wb$add_worksheet(\"colorScale\", zoom = 30) wb$add_data(x = df, col_names = FALSE) ## write data.frame wb$add_conditional_formatting( sheet = \"colorScale\", dims = wb_dims( rows = seq_len(nrow(df)), cols = seq_len(ncol(df)) ), # dims = wb_dims(x = df, col_names = FALSE, select = \"data\") style = c(\"black\", \"white\"), rule = c(0, 255), type = \"colorScale\" ) wb$set_col_widths(\"colorScale\", cols = seq_along(df), widths = 1.07) wb$set_row_heights(\"colorScale\", rows = seq_len(nrow(df)), heights = 7.5)"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"databars","dir":"Articles","previous_headings":"","what":"Databars","title":"Add conditional formatting to a workbook","text":"","code":"wb$add_worksheet(\"databar\") ## Databars wb$add_data(\"databar\", -5:5, start_col = 1) wb <- wb_add_conditional_formatting( wb, \"databar\", dims = \"A1:A11\", type = \"dataBar\" ) ## Default colors wb$add_data(\"databar\", -5:5, start_col = 3) wb <- wb_add_conditional_formatting( wb, \"databar\", dims = \"C1:C11\", type = \"dataBar\", params = list( showValue = FALSE, gradient = FALSE ) ) ## Default colors wb$add_data(\"databar\", -5:5, start_col = 5) wb <- wb_add_conditional_formatting( wb, sheet = \"databar\", dims = \"E1:E11\", type = \"dataBar\", style = c(\"#a6a6a6\"), params = list(showValue = FALSE) ) wb$add_data(\"databar\", -5:5, start_col = 7) wb <- wb_add_conditional_formatting( wb, \"databar\", dims = \"G1:G11\", type = \"dataBar\", style = c(\"red\"), params = list( showValue = TRUE, gradient = FALSE ) ) # custom color wb$add_data(\"databar\", -5:5, start_col = 9) wb <- wb_add_conditional_formatting( wb, \"databar\", dims = wb_dims(rows = 1:11, cols = 9), type = \"dataBar\", style = c(\"#a6a6a6\", \"#a6a6a6\"), params = list(showValue = TRUE, gradient = FALSE) ) # with rule wb$add_data(x = -5:5, start_col = 11) wb <- wb_add_conditional_formatting( wb, \"databar\", dims = wb_dims(rows = 1:11, cols = 11), type = \"dataBar\", rule = c(0, 5), style = c(\"#a6a6a6\", \"#a6a6a6\"), params = list(showValue = TRUE, gradient = FALSE) )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"between","dir":"Articles","previous_headings":"","what":"Between","title":"Add conditional formatting to a workbook","text":"Highlight cells interval [-2, 2]","code":"wb$add_worksheet(\"between\") wb$add_data(\"between\", -5:5) wb$add_conditional_formatting( \"between\", dims = wb_dims(rows = 2:11, cols = 1), type = \"between\", rule = c(-2, 2) ) wb$add_worksheet(\"topN\")"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"top-n","dir":"Articles","previous_headings":"","what":"Top N","title":"Add conditional formatting to a workbook","text":"Highlight top 5 values column x Highlight top 20 percentage column y","code":"wb$add_data(\"topN\", data.frame(x = 1:10, y = rnorm(10))) wb$add_conditional_formatting( \"topN\", dims = wb_dims(rows = 2:11, cols = 1), style = \"posStyle\", type = \"topN\", params = list(rank = 5) ) wb$add_conditional_formatting( \"topN\", dims = wb_dims(rows = 2:11, cols = 2), style = \"posStyle\", type = \"topN\", params = list(rank = 20, percent = TRUE) ) wb$add_worksheet(\"bottomN\")"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"bottom-n","dir":"Articles","previous_headings":"","what":"Bottom N","title":"Add conditional formatting to a workbook","text":"Highlight bottom 5 values column x Highlight bottom 20 percentage column y","code":"wb$add_data(\"bottomN\", data.frame(x = 1:10, y = rnorm(10))) wb$add_conditional_formatting( \"bottomN\", dims = wb_dims(rows = 2:11, cols = 1), style = \"negStyle\", type = \"bottomN\", params = list(rank = 5) ) wb$add_conditional_formatting( \"bottomN\", cols = 2, rows = 2:11, style = \"negStyle\", type = \"bottomN\", params = list(rank = 20, percent = TRUE) ) wb$add_worksheet(\"logical operators\")"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/conditional-formatting.html","id":"logical-operators","dir":"Articles","previous_headings":"","what":"Logical Operators","title":"Add conditional formatting to a workbook","text":"can use Excels logical Operators","code":"wb$add_data(\"logical operators\", 1:10) wb$add_conditional_formatting( \"logical operators\", dims = wb_dims(rows = 1:10, cols = 1), rule = \"OR($A1=1,$A1=3,$A1=5,$A1=7)\" )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2.html","id":"first-steps","dir":"Articles","previous_headings":"","what":"First steps","title":"openxlsx2 basic manual","text":"First let’s assume working installation openxlsx2 otherwise run lines install latest CRAN release: Now load library:","code":"install.packages(\"openxlsx2\") library(openxlsx2)"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2.html","id":"handling-workbooks","dir":"Articles","previous_headings":"","what":"Handling workbooks","title":"openxlsx2 basic manual","text":"foundation openxlsx2 workbook object. can think object workbook loaded spreadsheet software. import entire thing. Every sheet, every chart, image, column, formula style, conditional formatting, pivot table whatever else spreadsheet file allowed carry. Therefore file want work , can load : usually name workbook objects wb documentation, obligation, can name workbook object whatever like call . workbook yet, possible create one. next line use three wrapper functions wb_workbook(), wb_add_worksheet(), wb_add_data(). wrapper functions piped together using classic magrittr pipe operator %>%, similarly can use R’s native pipe operator |>. 1 assume dataset your_data, either vector, matrix data frame want write worksheet: Okay, now workbook object, actually done? Let’s work along pipe syntax: (1) first created workbook object wb_worbkook(), (2) next assigned worksheet wb_add_worksheet(), (3) written data onto worksheet. Let’s try actual data. use mtcars dataset. code switch fictional your_data mtcars: Let’s see output looks like: output looks little cryptic, simply tells name worksheet: wb_add_worksheet() created default worksheet name \"Sheet 1\". code can see use sheet tell wb_add_data() write data. internally use waiver current_sheet() write sheet = \"Sheet 1\" whenever work worksheet. Basically current sheet updated whenever new worksheet added workbook. create two sheets \"Sheet 1\" \"Sheet 2\" data written second sheet. can access data sheet? Either wb_to_df() internal handler read workbooks (underlying function wb_read() read_xlsx() mere aliases wb_to_df()). lets look top output: Ah! output second sheet. need either sheet = 2 sheet = \"Sheet 2\". go second variant, sheet index position name might differ. looks like head mtcars dataset. successfully read workbook. Now want export workbook file: Alternatively can directly open spreadsheet software (one installed): , lets try USPersonalExpenditure dataset: Dang! ? ’ve added worksheet, wait, ? , assign wrapper functions object effect. Wrapper functions alter workbook objects executed . can check workbook worksheets: assign sheet, changes, data correctly written: Now ’re probably thinking, don’t want assign workbook object time wb_ functions little tedious type. alternative called chaining. Since workbook R6 object internally, can make use chains. Basically every function starts wb_ underlying function name without prefix. data writing example can written : Whether use wrapper functions chain functions personal preference. just one thing remember, documentation exclusively written wrapper function. want know arguments wb$add_data() part, lookup wrapper functions man page ?wb_add_data.","code":"wb <- wb_load(\"your_file.xlsx\") wb <- wb_workbook() %>% wb_add_worksheet() %>% wb_add_data(x = your_data) wb <- wb_workbook() %>% wb_add_worksheet() %>% wb_add_data(x = mtcars) wb #> A Workbook object. #> #> Worksheets: #> Sheets: Sheet 1 #> Write order: 1 wb <- wb_workbook() %>% wb_add_worksheet() %>% wb_add_worksheet() %>% wb_add_data(x = mtcars) wb #> A Workbook object. #> #> Worksheets: #> Sheets: Sheet 1, Sheet 2 #> Write order: 1, 2 wb %>% wb_to_df() %>% head() #> sheet found, but contains no data #> NULL wb %>% wb_to_df(sheet = \"Sheet 2\") %>% head() #> mpg cyl disp hp drat wt qsec vs am gear carb #> 2 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4 #> 3 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4 #> 4 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1 #> 5 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1 #> 6 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2 #> 7 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1 wb %>% wb_save(file = \"my_first_worksheet.xlsx\") wb %>% wb_open() wb <- wb_workbook() wb_add_worksheet(wb, sheet = \"USexp\") wb_add_data(wb, \"USexp\", USPersonalExpenditure) #> Error : Can't add data to a workbook with no worksheet. #> Did you forget to add a worksheet with `wb_add_worksheet()`? wb %>% wb_get_sheet_names() #> named character(0) wb <- wb_workbook() wb <- wb_add_worksheet(wb, sheet = \"USexp\") wb <- wb_add_data(wb, \"USexp\", USPersonalExpenditure) wb_get_sheet_names(wb) #> USexp #> \"USexp\" wb_to_df(wb) #> 1940 1945 1950 1955 1960 #> 2 22.200 44.500 59.60 73.2 86.80 #> 3 10.500 15.500 29.00 36.5 46.20 #> 4 3.530 5.760 9.71 14.0 21.10 #> 5 1.040 1.980 2.45 3.4 5.40 #> 6 0.341 0.974 1.80 2.6 3.64 wb <- wb_workbook()$add_worksheet(\"USexp\")$add_data(x = USPersonalExpenditure) wb$to_df() #> 1940 1945 1950 1955 1960 #> 2 22.200 44.500 59.60 73.2 86.80 #> 3 10.500 15.500 29.00 36.5 46.20 #> 4 3.530 5.760 9.71 14.0 21.10 #> 5 1.040 1.980 2.45 3.4 5.40 #> 6 0.341 0.974 1.80 2.6 3.64"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2.html","id":"importing-as-workbook","dir":"Articles","previous_headings":"","what":"Importing as workbook","title":"openxlsx2 basic manual","text":"addition importing directly xlsx xlsm files, openxlsx2 provides wbWorkbook class used importing modifying entire openxml files R. workbook class heart openxlsx2 probably reason reading manual first place. Importing file workbook looks like : additional options wb_load() provides internal use: sheet loads selected sheet workbook data_only reads data parts workbook ignores additional graphics pivot tables. functions create workbook objects can used read data, recommend end users use . Especially intend re-export workbook afterwards. workbook imported, provide several functions interact modify (wb_to_df() function mentioned works way imported workbook). possible add new sheets remove sheets, well add remove data. R-plots can inserted also style workbook can changed, new fonts, background colors number formats. wealth options explained man pages additional style vignette (vignettes follow).","code":"# the file we are going to load file <- system.file(\"extdata\", \"openxlsx2_example.xlsx\", package = \"openxlsx2\") # loading the file into the workbook wb <- wb_load(file = file)"},{"path":[]},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2.html","id":"exporting-data-frames-or-vectors","dir":"Articles","previous_headings":"Exporting data","what":"Exporting data frames or vectors","title":"openxlsx2 basic manual","text":"want export data frame R, can use write_xlsx() create xlsx file. file can tweaked . See ?write_xlsx see options. (explanation examples follow).","code":"write_xlsx(x = mtcars, file = \"mtcars.xlsx\")"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2.html","id":"exporting-a-wbworkbook","dir":"Articles","previous_headings":"Exporting data","what":"Exporting a wbWorkbook","title":"openxlsx2 basic manual","text":"Imported workbooks can saved xlsx xlsm files wrapper wb_save() wb$save(). functions take filename optional overwrite option. latter set, optional guard provided check file want write already exists. careful, optional. default save file replace existing file. course, Windows, files locked (example, opened another process) replaced.","code":"# replace the existing file wb$save(\"mtcars.xlsx\") # do not overwrite the existing file try(wb$save(\"mtcars.xlsx\", overwrite = FALSE))"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2.html","id":"dims-wb_dims","dir":"Articles","previous_headings":"","what":"dims/ wb_dims()","title":"openxlsx2 basic manual","text":"openxlsx2 functions interact worksheet cells using dims argument require users provide . dims cells cell ranges A1 notation. single argument dims hereby replaces col/row, cols/rows xy. Since A1 notation rather simple first columns might get confusing 26. Therefore provide wrapper construct :","code":"# various options wb_dims(from_row = 4) #> [1] \"A4\" wb_dims(rows = 4, cols = 4) #> [1] \"D4\" wb_dims(rows = 4, cols = \"D\") #> [1] \"D4\" wb_dims(rows = 4:10, cols = 5:9) #> [1] \"E4:I10\" wb_dims(rows = 4:10, cols = \"A:D\") # same as below #> [1] \"A4:D10\" wb_dims(rows = seq_len(7), cols = seq_len(4), from_row = 4) #> [1] \"A4:D10\" # 10 rows and 15 columns from indice B2. wb_dims(rows = 1:10, cols = 1:15, from_col = \"B\", from_row = 2) #> [1] \"B2:P11\" # data + col names wb_dims(x = mtcars) #> [1] \"A1:K33\" # only data wb_dims(x = mtcars, select = \"data\") #> [1] \"A2:K33\" # The dims of the values of a column in `x` wb_dims(x = mtcars, cols = \"cyl\") #> [1] \"B2:B33\" # a column in `x` with the column name wb_dims(x = mtcars, cols = \"cyl\", select = \"x\") #> [1] \"B1:B33\" # rows in `x` wb_dims(x = mtcars) #> [1] \"A1:K33\" # in a wb chain wb <- wb_workbook()$ add_worksheet()$ add_data(x = mtcars)$ add_fill( dims = wb_dims(x = mtcars, rows = 1:5), # only 1st 5 rows of x data color = wb_color(\"yellow\") )$ add_fill( dims = wb_dims(x = mtcars, select = \"col_names\"), # only column names color = wb_color(\"cyan2\") ) # or if the data's first coord needs to be located in B2. wb_dims_custom <- function(...) { wb_dims(x = mtcars, from_col = \"B\", from_row = 2, ...) } wb <- wb_workbook()$ add_worksheet()$ add_data(x = mtcars, dims = wb_dims_custom())$ add_fill( dims = wb_dims_custom(rows = 1:5), color = wb_color(\"yellow\") )$ add_fill( dims = wb_dims_custom(select = \"col_names\"), color = wb_color(\"cyan2\") )"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2.html","id":"a-note-on-speed-and-memory-usage","dir":"Articles","previous_headings":"","what":"A note on speed and memory usage","title":"openxlsx2 basic manual","text":"current state openxlsx2 reasonably fast. , works well reasonably large input data reading writing. may work well data tests limits openxml specification. Things may slow R side things, performance usability depend speed size local operating system’s CPU memory. Note least two cases openxlsx2 constructs potentially large data frames () loading, openxlsx2 usually needs read entire input file pugixml convert long data frame(s), wb_to_df() converts one long data frame two data frames construct output object (ii) adding data workbook, openxlsx2 reshapes input data frame long data frame stores workbook, writes entire worksheet pugixml file written complete. Applying cell styles, date conversions etc. slow process finally sheets zipped provide xlsx output. Therefore, faced unreasonably large dataset, either give enough time, use another package write xlsx output (openxlsx2 written intention working maximum memory efficiency), means use ways store data (binary file formats database). However, always happy improve, found way improve currently , please let us know open issue pull request.","code":""},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_charts_manual.html","id":"section","dir":"Articles","previous_headings":"","what":"Add charts to a workbook","title":"Add charts to a workbook","text":"","code":"library(openxlsx2) # openxlsx2 >= 0.4 for mschart and rvg support ## create a workbook wb <- wb_workbook()"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_charts_manual.html","id":"add-plot-to-workbook","dir":"Articles","previous_headings":"","what":"Add plot to workbook","title":"Add charts to a workbook","text":"can include image PNG JPEG format. Simply open device save output pass worksheet wb_add_image().","code":"myplot <- tempfile(fileext = \".jpg\") jpeg(myplot) print(plot(AirPassengers)) #> NULL dev.off() #> agg_png #> 2 # Add basic plots to the workbook wb$add_worksheet(\"add_image\")$add_image(file = myplot)"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_charts_manual.html","id":"add-ggplot2-plot-to-workbook","dir":"Articles","previous_headings":"","what":"Add {ggplot2} plot to workbook","title":"Add charts to a workbook","text":"can include ggplot2 plots similar include openxlsx. Call plot first afterwards use wb_add_plot().","code":"if (requireNamespace(\"ggplot2\")) { library(ggplot2) p <- ggplot(mtcars, aes(x = mpg, fill = as.factor(gear))) + ggtitle(\"Distribution of Gas Mileage\") + geom_density(alpha = 0.5) print(p) # Add ggplot to the workbook wb$add_worksheet(\"add_plot\")$ add_plot(width = 5, height = 3.5, file_type = \"png\", units = \"in\") } #> Loading required namespace: ggplot2"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_charts_manual.html","id":"add-plot-via-rvg","dir":"Articles","previous_headings":"","what":"Add plot via {rvg}","title":"Add charts to a workbook","text":"want vector graphics can modified spreadsheet software dml_xlsx() device comes handy. can pass output via wb_add_drawing().","code":"if (requireNamespace(\"ggplot2\") && requireNamespace(\"rvg\")) { library(rvg) ## create rvg example p <- ggplot(iris, aes(x = Sepal.Length, y = Petal.Width)) + geom_point() + labs(title = \"With font Bradley Hand\") + theme_minimal(base_family = \"sans\", base_size = 18) tmp <- tempfile(fileext = \".xml\") rvg::dml_xlsx(file = tmp, fonts = list(sans = \"Bradley Hand\")) print(p) dev.off() # Add rvg to the workbook wb$add_worksheet(\"add_drawing\")$ add_drawing(xml = tmp)$ add_drawing(xml = tmp, dims = NULL) } #> Loading required namespace: rvg"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_charts_manual.html","id":"add-mschart-plots","dir":"Articles","previous_headings":"","what":"Add {mschart} plots","title":"Add charts to a workbook","text":"want native open xml charts, look mschart. Create one chart files pass workbook wb_add_mschart(). two options possible. 1. Either default mschart output identical one officer. Passing data object let mschart prepare data. case wb_add_mschart() add new data region. 2. Passing wb_data() object mschart. object contains references data worksheet allows using data “”.","code":"if (requireNamespace(\"mschart\")) { library(mschart) # mschart >= 0.4 for openxlsx2 support ## create chart from mschart object (this creates new input data) mylc <- ms_linechart( data = browser_ts, x = \"date\", y = \"freq\", group = \"browser\" ) wb$add_worksheet(\"add_mschart\")$add_mschart(dims = \"A10:G25\", graph = mylc) ## create chart referencing worksheet cells as input # write data starting at B2 wb$add_worksheet(\"add_mschart - wb_data\")$ add_data(x = mtcars, dims = \"B2\")$ add_data(x = data.frame(name = rownames(mtcars)), dims = \"A2\") # create wb_data object this will tell this mschart # from this PR to create a file corresponding to openxlsx2 dat <- wb_data(wb, dims = \"A2:G10\") # create a few mscharts scatter_plot <- ms_scatterchart( data = dat, x = \"mpg\", y = c(\"disp\", \"hp\") ) bar_plot <- ms_barchart( data = dat, x = \"name\", y = c(\"disp\", \"hp\") ) area_plot <- ms_areachart( data = dat, x = \"name\", y = c(\"disp\", \"hp\") ) line_plot <- ms_linechart( data = dat, x = \"name\", y = c(\"disp\", \"hp\"), labels = c(\"disp\", \"hp\") ) # add the charts to the data wb <- wb %>% wb_add_mschart(dims = \"F4:L20\", graph = scatter_plot) %>% wb_add_mschart(dims = \"F21:L37\", graph = bar_plot) %>% wb_add_mschart(dims = \"M4:S20\", graph = area_plot) %>% wb_add_mschart(dims = \"M21:S37\", graph = line_plot) # add chartsheet wb <- wb %>% wb_add_chartsheet() %>% wb_add_mschart(graph = scatter_plot) } #> Loading required namespace: mschart"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_formulas_manual.html","id":"simple-formulas","dir":"Articles","previous_headings":"","what":"Simple formulas","title":"Add formulas to a workbook","text":"","code":"wb <- wb_workbook()$add_worksheet()$ add_data(x = head(cars))$ add_formula(x = \"SUM(A2, B2)\", dims = \"D2\")$ add_formula(x = \"A2 + B2\", dims = \"D3\") # wb$open()"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_formulas_manual.html","id":"array-formulas","dir":"Articles","previous_headings":"","what":"Array formulas","title":"Add formulas to a workbook","text":"","code":"wb <- wb_workbook()$add_worksheet()$ add_data(x = head(cars))$ add_formula(x = \"A2:A7 * B2:B7\", dims = \"C2:C7\", array = TRUE) # wb$open()"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_formulas_manual.html","id":"array-formulas-creating-multiple-fields","dir":"Articles","previous_headings":"","what":"Array formulas creating multiple fields","title":"Add formulas to a workbook","text":"example want use MMULT() creates matrix multiplication. requires us write array formula specify region output written . Similar coefficients linear regression","code":"m1 <- matrix(1:6, ncol = 2) m2 <- matrix(7:12, nrow = 2) wb <- wb_workbook()$add_worksheet()$ add_data(x = m1)$ add_data(x = m2, dims = wb_dims(from_col = 4))$ add_formula(x = \"MMULT(A2:B4, D2:F3)\", dims = \"H2:J4\", array = TRUE) # wb$open() # we expect to find this in D1:E1 coef(lm(head(cars))) #> (Intercept) dist #> 5.2692308 0.1153846 wb <- wb_workbook()$add_worksheet()$ add_data(x = head(cars))$ add_formula(x = \"LINEST(A2:A7, B2:B7, TRUE)\", dims = \"D2:E2\", array = TRUE) # wb$open()"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_formulas_manual.html","id":"cells-metadata-cm-formulas","dir":"Articles","previous_headings":"","what":"cells metadata (cm) formulas","title":"Add formulas to a workbook","text":"Similar array formulas, cell metadata (cm) formulas hide user array formulas. Using implemented openxlsx2 > 0.6.1:","code":"wb <- wb_workbook()$add_worksheet()$ add_data(x = head(cars))$ add_formula(x = \"SUM(ABS(A2:A7))\", dims = \"D2\", cm = TRUE) #> Warning in write_data2(wb = wb, sheet = sheet, data = x, name = name, colNames #> = colNames, : modifications with cm formulas are experimental. use at own risk # wb$open()"},{"path":[]},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_formulas_manual.html","id":"datatable-formula-differences","dir":"Articles","previous_headings":"dataTable formulas1","what":"dataTable formula differences","title":"Add formulas to a workbook","text":"Given basic table like , similarly basic formula total_sales “= A2 * C2” row value changing row. implementation formula using wb_add_formula() look (taken current documentation) lets say ’ve read data assigned table company_sales create workbook, worksheet, use wb_add_data_table(). One advantages open xml dataTable syntax don’t specify row numbers columns letters. table also grows dynamically, adding new rows new data appended extending formulas new rows. dataTable named columns can use instead letters. writing formulas within dataTable use following syntax [@[column_name]] reference current row. “total_sales” formula written open xml dataTable look like ; =[@[sales_price]] * [@[sales_quantity]] writing formula outside dataTable reference table name. case lets say table name ‘daily_sales’ =daily_sales[@[sales_price]] * daily_sales[@[sales_quantity]] However, pass text formula written cause error syntax open xml requires selecting current row different. open xml dataTable formula looks like : Now can see open xml replaces [@[sales_price]] daily_sales[[#Row],[sales_price]] must use syntax writing formulas dataTable open workbook view table created can see formula worked. can also see replaced [#Row] @. completion, formula wrote appears ;","code":"## creating example data company_sales <- data.frame( sales_price = c(20, 30, 40), COGS = c(5, 11, 13), sales_quantity = c(1, 2, 3) ) ## write in the formula company_sales$total_sales <- paste(paste0(\"A\", 1:3 + 1L), paste0(\"C\", 1:3 + 1L), sep = \" * \") ## add the formula class class(company_sales$total_sales) <- c(class(company_sales$total_sales), \"formula\") ## write a workbook wb <- wb_workbook()$ add_worksheet(\"Total Sales\")$ add_data_table(x = company_sales) daily_sales[[#This Row],[sales_price]]*daily_sales[[#ThisRow],[sales_quantity]] <\/calculatedColumnFormula> ## Because we want the `dataTable` formula to propagate down the entire column of the data ## we can assign the formula by itself to any column and allow that single string to be repeated for each row. ## creating example data example_data <- data.frame( sales_price = c(20, 30, 40), COGS = c(5, 11, 13), sales_quantity = c(1, 2, 3) ) ## base R method example_data$gross_profit <- \"daily_sales[[#This Row],[sales_price]] - daily_sales[[#This Row],[COGS]]\" example_data$total_COGS <- \"daily_sales[[#This Row],[COGS]] * daily_sales[[#This Row],[sales_quantity]]\" example_data$total_sales <- \"daily_sales[[#This Row],[sales_price]] * daily_sales[[#This Row],[sales_quantity]]\" example_data$total_gross_profit <- \"daily_sales[[#This Row],[total_sales]] - daily_sales[[#This Row],[total_COGS]]\" class(example_data$gross_profit) <- c(class(example_data$gross_profit), \"formula\") class(example_data$total_COGS) <- c(class(example_data$total_COGS), \"formula\") class(example_data$total_sales) <- c(class(example_data$total_sales), \"formula\") class(example_data$total_gross_profit) <- c(class(example_data$total_gross_profit), \"formula\") wb$ add_worksheet(\"Daily Sales\")$ add_data_table( x = example_data, table_style = \"TableStyleMedium2\", table_name = \"daily_sales\" ) #### sum dataTable examples wb$add_worksheet(\"sum_examples\") ### Note: dataTable formula do not need to be used inside of dataTables. dataTable formula are for referencing the data within the dataTable. ### Note: dataTable formula do not need to be used inside of dataTables. dataTable formula are for referencing the data within the dataTable. sum_examples <- data.frame( description = c(\"sum_sales_price\", \"sum_product_Price_Quantity\"), formula = c(\"\", \"\") ) wb$add_data(x = sum_examples) # add formulas wb$add_formula(x = \"sum(daily_sales[[#Data],[sales_price]])\", dims = \"B2\") wb$add_formula(x = \"sum(daily_sales[[#Data],[sales_price]] * daily_sales[[#Data],[sales_quantity]])\", dims = \"B3\", array = TRUE) #### dataTable referencing wb$add_worksheet(\"dt_references\") ### Adding the headers by themselves. wb$add_formula( x = \"daily_sales[[#Headers],[sales_price]:[total_gross_profit]]\", dims = \"A1:G1\", array = TRUE ) ### Adding the raw data by reference and selecting them directly. wb$add_formula( x = \"daily_sales[[#Data],[sales_price]:[total_gross_profit]]\", start_row = 2, dims = \"A2:G4\", array = TRUE ) # wb$open()"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_read_to_df.html","id":"importing-data","dir":"Articles","previous_headings":"","what":"Importing data","title":"openxlsx2 read to data frame manual","text":"Coming openxlsx might know read.xlsx() (two functions, one files one workbooks) readWorkbook(). Functions different things, mostly . openxlsx2 tried best reduce complexity hood user well. openxlsx2 replaced read_xlsx(), wb_read() share underlying function wb_to_df(). example use example data provided package. can locate “inst/extdata” folder. files included package source can open calculation software well.","code":""},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_read_to_df.html","id":"basic-import","dir":"Articles","previous_headings":"Importing data","what":"Basic import","title":"openxlsx2 read to data frame manual","text":"begin openxlsx2_example.xlsx file telling R find file system object contains path xlsx file pass file function read workbook R output created data frame contains data types date, logical, numeric character. function import file R, wb_to_df() provides similar options openxlsx functions read.xlsx() readWorkbook() new functions go options. might noticed, return column xlsx file row name data frame returned. Per default first sheet workbook imported. want switch , either provide sheet parameter correct index provide sheet name.","code":"file <- system.file(\"extdata\", \"openxlsx2_example.xlsx\", package = \"openxlsx2\") # import workbook library(openxlsx2) wb_to_df(file) #> Var1 Var2 NA Var3 Var4 Var5 Var6 Var7 Var8 #> 3 TRUE 1 NA 1 a 2023-05-29 3209324 This #DIV/0! 01:27:15 #> 4 TRUE NA NA #NUM! b 2023-05-23 0 14:02:57 #> 5 TRUE 2 NA 1.34 c 2023-02-01 #VALUE! 23:01:02 #> 6 FALSE 2 NA #NUM! 2 17:24:53 #> 7 FALSE 3 NA 1.56 e #> 8 FALSE 1 NA 1.7 f 2023-03-02 2.7 08:45:58 #> 9 NA NA NA #> 10 FALSE 2 NA 23 h 2023-12-24 25 #> 11 FALSE 3 NA 67.3 i 2023-12-25 3 #> 12 NA 1 NA 123 2023-07-31 122 "},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_read_to_df.html","id":"col_names---first-row-as-column-name","dir":"Articles","previous_headings":"Importing data","what":"col_names - first row as column name","title":"openxlsx2 read to data frame manual","text":"previous example first imported row used column name data frame. default behavior, always wanted expected. Therefore behavior can disabled user.","code":"# do not convert first row to column names wb_to_df(file, col_names = FALSE) #> B C D E F G H I J #> 2 Var1 Var2 NA Var3 Var4 Var5 Var6 Var7 Var8 #> 3 TRUE 1 NA 1 a 2023-05-29 3209324 This #DIV/0! 01:27:15 #> 4 TRUE NA #NUM! b 2023-05-23 0 14:02:57 #> 5 TRUE 2 NA 1.34 c 2023-02-01 #VALUE! 23:01:02 #> 6 FALSE 2 NA #NUM! 2 17:24:53 #> 7 FALSE 3 NA 1.56 e #> 8 FALSE 1 NA 1.7 f 2023-03-02 2.7 08:45:58 #> 9 NA #> 10 FALSE 2 NA 23 h 2023-12-24 25 #> 11 FALSE 3 NA 67.3 i 2023-12-25 3 #> 12 1 NA 123 2023-07-31 122 "},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_read_to_df.html","id":"detect_dates---convert-cells-to-r-dates","dir":"Articles","previous_headings":"Importing data","what":"detect_dates - convert cells to R dates","title":"openxlsx2 read to data frame manual","text":"creators openxml standard well known mistakenly treating something date openxlsx2 built ways identify cell date try convert value , unfortunately always trivial task might fail. case provide option disable date conversion entirely. case underlying numerical value returned.","code":"# do not try to identify dates in the data wb_to_df(file, detect_dates = FALSE) #> Var1 Var2 NA Var3 Var4 Var5 Var6 Var7 Var8 #> 3 TRUE 1 NA 1 a 45075 3209324 This #DIV/0! 0.06059028 #> 4 TRUE NA NA #NUM! b 45069 0 0.58538194 #> 5 TRUE 2 NA 1.34 c 44958 #VALUE! 0.95905093 #> 6 FALSE 2 NA #NUM! NA 2 0.72561343 #> 7 FALSE 3 NA 1.56 e NA NA #> 8 FALSE 1 NA 1.7 f 44987 2.7 0.36525463 #> 9 NA NA NA NA NA #> 10 FALSE 2 NA 23 h 45284 25 NA #> 11 FALSE 3 NA 67.3 i 45285 3 NA #> 12 NA 1 NA 123 45138 122 NA"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_read_to_df.html","id":"show_formula---show-formulas-instead-of-results","dir":"Articles","previous_headings":"Importing data","what":"show_formula - show formulas instead of results","title":"openxlsx2 read to data frame manual","text":"Sometimes things might feel . can openxml files updating formula results sheets unless opened software provides functionality certain tabular calculation software. Therefore user might interested underlying functions see going sheet. Using show_formula possible","code":"# return the underlying Excel formula instead of their values wb_to_df(file, show_formula = TRUE) #> Var1 Var2 NA Var3 Var4 Var5 Var6 Var7 Var8 #> 3 TRUE 1 NA 1 a 2023-05-29 3209324 This E3/0 01:27:15 #> 4 TRUE NA NA #NUM! b 2023-05-23 C4 14:02:57 #> 5 TRUE 2 NA 1.34 c 2023-02-01 #VALUE! 23:01:02 #> 6 FALSE 2 NA #NUM! C6+E6 17:24:53 #> 7 FALSE 3 NA 1.56 e #> 8 FALSE 1 NA 1.7 f 2023-03-02 C8+E8 08:45:58 #> 9 NA NA NA #> 10 FALSE 2 NA 23 h 2023-12-24 SUM(C10,E10) #> 11 FALSE 3 NA 67.3 i 2023-12-25 PRODUCT(C11,E3) #> 12 NA 1 NA 123 2023-07-31 E12-C12 "},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_read_to_df.html","id":"dims---read-specific-dimension","dir":"Articles","previous_headings":"Importing data","what":"dims - read specific dimension","title":"openxlsx2 read to data frame manual","text":"Sometimes entire worksheet contains much data, case provide functions read selected dimension range. range consists either specific cell like “A1” cell range notion used openxml standard Alternatively, don’t know Excel sheet’s address, can use wb_dims() specify dimension. See ?wb_dims details.","code":"# read dimension without column names wb_to_df(file, dims = \"A2:C5\", col_names = FALSE) #> A B C #> 2 NA Var1 Var2 #> 3 NA TRUE 1 #> 4 NA TRUE #> 5 NA TRUE 2 # read dimension without column names with `wb_dims()` wb_to_df(file, dims = wb_dims(rows = 2:5, cols = 1:3), col_names = FALSE) #> A B C #> 2 NA Var1 Var2 #> 3 NA TRUE 1 #> 4 NA TRUE #> 5 NA TRUE 2"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_read_to_df.html","id":"cols---read-selected-columns","dir":"Articles","previous_headings":"Importing data","what":"cols - read selected columns","title":"openxlsx2 read to data frame manual","text":"want read specific cell, cell range can use column attribute. attribute takes numeric vector argument","code":"# read selected cols wb_to_df(file, cols = c(\"A:B\", \"G\")) #> NA Var1 Var5 #> 3 NA TRUE 2023-05-29 #> 4 NA TRUE 2023-05-23 #> 5 NA TRUE 2023-02-01 #> 6 NA FALSE #> 7 NA FALSE #> 8 NA FALSE 2023-03-02 #> 9 NA NA #> 10 NA FALSE 2023-12-24 #> 11 NA FALSE 2023-12-25 #> 12 NA NA 2023-07-31"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_read_to_df.html","id":"rows---read-selected-rows","dir":"Articles","previous_headings":"Importing data","what":"rows - read selected rows","title":"openxlsx2 read to data frame manual","text":"goes rows. can select using numeric vectors","code":"# read selected rows wb_to_df(file, rows = c(2, 4, 6)) #> Var1 Var2 NA Var3 Var4 Var5 Var6 Var7 Var8 #> 4 TRUE NA NA #NUM! b 2023-05-23 NA 0 14:02:57 #> 6 FALSE 2 NA #NUM! NA 2 17:24:53"},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_read_to_df.html","id":"convert---convert-input-to-guessed-type","dir":"Articles","previous_headings":"Importing data","what":"convert - convert input to guessed type","title":"openxlsx2 read to data frame manual","text":"xml exists difference value types. values per default characters. provide numerics, logicals dates, openxlsx2 every software dealing xlsx files make assumptions cell type. especially tricky due notion worksheets. Unlike data frame, worksheet can wild mix types data. Even though conversion process character date numeric rather solid, sometimes user might want see data without conversion applied. might useful cases something unexpected happened import created warnings. case can look raw input data. want disable date detection well, please see entry .","code":"# convert characters to numerics and date (logical too?) wb_to_df(file, convert = FALSE) #> Var1 Var2 NA Var3 Var4 Var5 Var6 Var7 Var8 #> 3 TRUE 1 1 a 2023-05-29 3209324 This #DIV/0! 01:27:15 #> 4 TRUE #NUM! b 2023-05-23 0 14:02:57 #> 5 TRUE 2 1.34 c 2023-02-01 #VALUE! 23:01:02 #> 6 FALSE 2 #NUM! 2 17:24:53 #> 7 FALSE 3 1.56 e #> 8 FALSE 1 1.7 f 2023-03-02 2.7 08:45:58 #> 9 #> 10 FALSE 2 23 h 2023-12-24 25 #> 11 FALSE 3 67.3 i 2023-12-25 3 #> 12 1 123 2023-07-31 122 "},{"path":"https://janmarvin.github.io/openxlsx2/dev/articles/openxlsx2_read_to_df.html","id":"skip_empty_rows---remove-empty-rows","dir":"Articles","previous_headings":"Importing data","what":"skip_empty_rows - remove empty rows","title":"openxlsx2 read to data frame manual","text":"Even though openxlsx2 imports everything requested, sometimes might helpful remove empty lines data. might either left empty intentional empty formatted, cell value removed afterwards. added mostly backward comparability, default changed FALSE. behavior changed bit well. Previously empty cells removed prior conversion R data frames, now removed conversion removed completely empty","code":"# erase empty rows from dataset wb_to_df(file, sheet = 1, skip_empty_rows = TRUE) |> tail() #> Var1 Var2 NA Var3 Var4 Var5 Var6 Var7 Var8 #> 6 FALSE 2 NA #NUM! 2 17:24:53 #> 7 FALSE 3 NA 1.56 e #> 8 FALSE 1 NA 1.7 f 2023-03-02 2.7 08:45:58 #> 10 FALSE 2 NA 23 h 2023-12-24
Source: inst/CITATION
inst/CITATION
(2024). openxlsx2: Read, Write and Edit 'xlsx' Files. R package version 1.6.0.9000. URL https://github.com/JanMarvin/openxlsx2.
(2024). openxlsx2: Read, Write and Edit 'xlsx' Files. R package version 1.7.0.9000. URL https://github.com/JanMarvin/openxlsx2.
@Manual{, title = {openxlsx2: Read, Write and Edit 'xlsx' Files}, year = {2024}, - note = {R package version 1.6.0.9000}, + note = {R package version 1.7.0.9000}, url = {https://janmarvin.github.io/openxlsx2/}, }
CRAN release: 2024-06-02
Add function to remove conditional formatting from worksheet wb_remove_conditional_formatting() 1011
wb_remove_conditional_formatting()
Silence a warning triggered by a folder called "[trash]". 1012
"[trash]"
Initial support for pivot table timelines. 1016
Add wb_add_timeline() and extend wb_add_slicer(). 1017
wb_add_timeline()
wb_add_slicer()
Fixed an issue with non consecutive dims, where columns or rows were silently dropped. 1015
Fixes to wb_clone_worksheet() cloning drawings and images should be restored. 1016
wb_clone_worksheet()
Fixed an issue where non consecutive columns with special types would overlap. If columns A and C were dates, column B would be formatted as date too. 1026