R: Open a Microsoft Excel file (xls/xlsx) or an openxlsx...

openXL {openxlsx} | R Documentation

## Open a Microsoft Excel file (xls/xlsx) or an openxlsx Workbook

### Description

This function tries to open a Microsoft Excel (xls/xlsx) file or an openxlsx Workbook with the proper application, in a portable manner.

In Windows (c) and Mac (c), it uses system default handlers, given the file type.

In Linux it searches (via `which`) for available xls/xlsx reader applications (unless `options('openxlsx.excelApp')` is set to the app bin path), and if it finds anything, sets `options('openxlsx.excelApp')` to the program choosed by the user via a menu (if many are present, otherwise it will set the only available). Currently searched for apps are Libreoffice/Openoffice (`soffice` bin), Gnumeric (`gnumeric`) and Calligra Sheets (`calligrasheets`).

### Usage

    openXL(file=NULL)

### Arguments

`file` | path to the Excel (xls/xlsx) file or Workbook object.

### Author(s)

Luca Braglia

### Examples

    # file example
    example(writeData)
    #openXL("writeDataExample.xlsx")

    # (not yet saved) Workbook example
    wb <- createWorkbook()
    x <- mtcars[1:6,]
    addWorksheet(wb, "Cars")
    writeData(wb, "Cars", x, startCol = 2, startRow = 3, rowNames = TRUE)
    #openXL(wb)

[Package openxlsx version 4.0.17 Index]