excel Export R Output To Excel The main command for directly writing a data frame to an Excel file is writexlsx. That mostly works…