Main

read_xlsx()

Read from an Excel file or Workbook object

write_xlsx()

write data to an xlsx file

wbWorkbook

R6 class for a Workbook

wb functions

wb_workbook()

Create a new Workbook object

wb_load()

Load an existing .xlsx file

wb_save()

Save Workbook to file

wb_to_df()

Create Dataframe from Workbook

wb_read()

Read from an Excel file or Workbook object

wb add and remove functions

create_comment() write_comment() remove_comment() wb_add_comment() wb_remove_comment()

Create, write and remove comments

wb_add_named_region() wb_remove_named_region()

Create / delete a named region

wb_add_border()

add border for cell region

wb_add_cell_style()

add cell style for cell region

wb_add_chart_xml()

add a chart xml to a workbook

wb_add_chartsheet()

Add a chartsheet to a workbook

wb_add_conditional_formatting() wb_conditional_formatting()

Add conditional formatting to cells

wb_add_data_table()

Add data to a worksheet as an Excel table

wb_add_data_validation()

Add data validation to cells

wb_add_drawing()

add drawings to workbook

wb_add_fill()

add fill for cell region

wb_add_filter()

Add column filters

wb_add_font()

add font for cell region

wb_add_form_control()

Add form control Checkbox, Radiobuttons or Dropmenu

wb_add_formula()

Add a character vector as an Excel Formula

wb_add_image()

Insert an image into a worksheet

wb_add_mschart()

Add mschart object to an existing workbook

wb_add_numfmt()

add numfmt for cell region

wb_add_page_break()

Add a page break to a worksheet

wb_add_pivot_table()

Add pivot table to a worksheet

wb_add_plot()

Insert the current plot into a worksheet

wb_add_sparklines()

add sparklines to workbook

wb_add_style()

add style to workbook

wb_add_worksheet()

Add a worksheet to a workbook

wb_add_creators() wb_set_creators() wb_remove_creators() wb_get_creators()

Workbook creators

wb_add_data() write_data()

Add data to a worksheet

wb_remove_col_widths()

Remove column widths from a worksheet

wb_remove_filter()

Remove a worksheet filter

wb_remove_row_heights()

Remove custom row heights from a worksheet

wb_remove_tables()

Remove an Excel table in a workbook

wb_remove_worksheet()

Remove a worksheet from a workbook

wb get and set functions

wb_get_cell_style() wb_set_cell_style()

get and set cell style

wb_get_active_sheet() wb_set_active_sheet() wb_get_selected() wb_set_selected()

get and set table of sheets and their state as selected and active

wb_get_sheet_visibility() wb_set_sheet_visibility()

Get/set worksheet visible state

wb_add_creators() wb_set_creators() wb_remove_creators() wb_get_creators()

Workbook creators

wb_get_base_font()

Return the workbook default font

wb_get_sheet_name()

Get sheet name

wb_get_sheet_names()

Get worksheet names for a workbook

wb_get_tables()

List Excel tables in a workbook

wb_get_worksheet() wb_ws()

Get a worksheet from a wbWorkbook object

wb_get_order() wb_set_order()

Order of worksheets in xlsx file

wb_set_base_font()

Modify the default font

wb_set_bookview()

Set the workbook position, size and filter

wb_set_col_widths()

Set worksheet column widths

wb_set_header_footer()

Set document headers and footers

wb_set_last_modified_by()

Add another author to the meta data of the file.

wb_set_row_heights()

Set worksheet row heights

wb_set_sheet_names()

Set worksheet names for a workbook

create functions

create_comment() write_comment() remove_comment() wb_add_comment() wb_remove_comment()

Create, write and remove comments

create_border()

create border

create_cell_style()

create_cell_style

create_dxfs_style()

Create a custom formatting style

create_fill()

create fill

create_font()

create font format

create_hyperlink()

create Excel hyperlink string

create_numfmt()

create number format

create_sparklines()

create sparklines used in add_sparline()

XML functions

A curated list of XML functions used in openxlsx2.

read_xml()

read xml file

xml_node() xml_node_name() xml_value() xml_attr()

xml_node

xml_add_child()

append xml child to node

xml_attr_mod()

adds or updates attribute(s) in existing xml node

xml_node_create()

create xml_node from R objects

xml_rm_child()

remove xml child to node

as_xml()

loads character string to pugixml and returns an externalptr

All functions

wb_hyperlink()

Create a new hyperlink object

get_named_regions()

Get create or remove named regions

as_xml()

loads character string to pugixml and returns an externalptr

wb_get_cell_style() wb_set_cell_style()

get and set cell style

clean_worksheet_name()

Clean worksheet name

wb_clean_sheet() delete_data()

clean sheet (remove all values)

cloneSheetStyle()

clone sheets style

col2int()

Convert Excel column to integer

create_comment() write_comment() remove_comment() wb_add_comment() wb_remove_comment()

Create, write and remove comments

convertToExcelDate()

convert back to ExcelDate

convert_date()

Convert from excel date number to R Date type

convert_datetime()

Convert from excel time number to R POSIXct type.

create_border()

create border

create_cell_style()

create_cell_style

create_dxfs_style()

Create a custom formatting style

create_fill()

create fill

create_font()

create font format

create_hyperlink()

create Excel hyperlink string

create_numfmt()

create number format

create_sparklines()

create sparklines used in add_sparline()

dataframe_to_dims()

create dimensions from dataframe

dims_to_dataframe()

create dataframe from dimensions

get_cell_refs()

Return excel cell coordinates from (x,y) coordinates

get_cell_style()

helper get_cell_style

get_date_origin()

Get the date origin an xlsx file is using

guess_col_type()

function to estimate the column type. 0 = character, 1 = numeric, 2 = date.

int2col()

Convert integer to Excel column

wb_add_named_region() wb_remove_named_region()

Create / delete a named region

numfmt_is_date()

check if numFmt is date. internal function

numfmt_is_posix()

check if numFmt is posix. internal function

openxlsx2

xlsx reading, writing and editing.

print(<pugi_xml>)

print pugi_xml

xml_node() xml_node_name() xml_value() xml_attr()

xml_node

read_sheet_names()

Get names of worksheets

read_xlsx()

Read from an Excel file or Workbook object

read_xml()

read xml file

wb_get_active_sheet() wb_set_active_sheet() wb_get_selected() wb_set_selected()

get and set table of sheets and their state as selected and active

set_cell_style()

helper set_cell_style

wb_get_sheet_visibility() wb_set_sheet_visibility()

Get/set worksheet visible state

style_is_date()

check if style is date. internal function

style_is_posix()

check if style is posix. internal function

style_mgr

style manager

styles_on_sheet()

get all styles on a sheet

temp_xlsx()

helper function to create temporary directory for testing purpose

current_sheet() next_sheet() na_strings()

openxlsx2 waivers

wbChartSheet

R6 class for a Workbook Chart Sheet

wb_color()

Create a new wbColour object

wbComment

R6 class for a Workbook Comments

wbHyperlink

R6 class for a Workbook Hyperlink

wb_sheet_data()

R6 class for a Workbook Hyperlink

wbWorkbook

R6 class for a Workbook

wbWorksheet

R6 class for a Workbook Worksheet

wb_add_border()

add border for cell region

wb_add_cell_style()

add cell style for cell region

wb_add_chart_xml()

add a chart xml to a workbook

wb_add_chartsheet()

Add a chartsheet to a workbook

wb_add_conditional_formatting() wb_conditional_formatting()

Add conditional formatting to cells

wb_add_data_table()

Add data to a worksheet as an Excel table

wb_add_data_validation()

Add data validation to cells

wb_add_drawing()

add drawings to workbook

wb_add_fill()

add fill for cell region

wb_add_filter()

Add column filters

wb_add_font()

add font for cell region

wb_add_form_control()

Add form control Checkbox, Radiobuttons or Dropmenu

wb_add_formula()

Add a character vector as an Excel Formula

wb_add_image()

Insert an image into a worksheet

wb_add_mschart()

Add mschart object to an existing workbook

wb_add_numfmt()

add numfmt for cell region

wb_add_page_break()

Add a page break to a worksheet

wb_add_pivot_table()

Add pivot table to a worksheet

wb_add_plot()

Insert the current plot into a worksheet

wb_add_sparklines()

add sparklines to workbook

wb_add_style()

add style to workbook

wb_add_worksheet()

Add a worksheet to a workbook

wb_clone_sheet_style()

clone sheets style

wb_clone_worksheet()

Clone a worksheet to a workbook

wb_copy_cells()

copy cells around

wb_add_creators() wb_set_creators() wb_remove_creators() wb_get_creators()

Workbook creators

wb_data()

provide wb_data object as mschart input

wb_freeze_pane()

Freeze a worksheet pane

wb_get_base_font()

Return the workbook default font

wb_get_sheet_name()

Get sheet name

wb_get_sheet_names()

Get worksheet names for a workbook

wb_get_tables()

List Excel tables in a workbook

wb_get_worksheet() wb_ws()

Get a worksheet from a wbWorkbook object

wb_grid_lines()

Set worksheet gridlines to show or hide.

wb_load()

Load an existing .xlsx file

wb_set_base_font()

Modify the default font

wb_open()

little worksheet opener

wb_get_order() wb_set_order()

Order of worksheets in xlsx file

wb_protect()

Protect a workbook from modifications

wb_protect_worksheet()

Protect a worksheet from modifications

wb_read()

Read from an Excel file or Workbook object

wb_remove_col_widths()

Remove column widths from a worksheet

wb_remove_filter()

Remove a worksheet filter

wb_remove_row_heights()

Remove custom row heights from a worksheet

wb_remove_tables()

Remove an Excel table in a workbook

wb_remove_worksheet()

Remove a worksheet from a workbook

wb_save()

Save Workbook to file

wb_set_bookview()

Set the workbook position, size and filter

wb_set_col_widths()

Set worksheet column widths

wb_set_header_footer()

Set document headers and footers

wb_set_last_modified_by()

Add another author to the meta data of the file.

wb_set_row_heights()

Set worksheet row heights

wb_set_sheet_names()

Set worksheet names for a workbook

wb_to_df()

Create Dataframe from Workbook

wb_workbook()

Create a new Workbook object

wb_group_cols() wb_ungroup_cols() wb_group_rows() wb_ungroup_rows()

Group Rows and Columns

wb_add_data() write_data()

Add data to a worksheet

write_datatable()

Write to a worksheet as an Excel table

write_file()

write xml file

write_formula()

Write a character vector as an Excel Formula

write_xlsx()

write data to an xlsx file

wb_merge_cells() wb_unmerge_cells()

Worksheet cell merging

wb_page_setup()

Set page margins, orientation and print scaling

xl_open()

Open a Microsoft Excel file (xls/xlsx) or an openxlsx2 wbWorkbook

xml_add_child()

append xml child to node

xml_attr_mod()

adds or updates attribute(s) in existing xml node

xml_node_create()

create xml_node from R objects

xml_rm_child()

remove xml child to node