read_xlsx: Read data frame from a "xlsx" file

View source: R/utils-readxlsx.R

read_xlsxR Documentation

Read data frame from a 'xlsx' file

Description

Tries to use 'readxl' package or 'pandas' to read data frame.

Usage

read_xlsx(
  path,
  sheet = NULL,
  method = c("auto", "pandas", "readxl"),
  n_max = Inf,
  ...
)

Arguments

path

'xlsx' file path

sheet

either a character or an integer of which spread-sheet to read; the number starts from 1

method

which method to use for reading the 'xlsx' file; choices are 'auto' (automatically find proper method), 'pandas' (use pandas.read_xlsx), or 'readxl' (use the corresponding R package)

n_max

maximum number of rows (excluding headers) to read

...

passed to 'Python' function pandas.read_xlsx or readxl::read_excel, depending on method

Value

A data.frame table

Examples


## Not run: 

rpymat::read_xlsx("Book1.xlsx", sheet = 1)

rpymat::read_xlsx("Book1.xlsx", sheet = "sheet1")


## End(Not run)



rpymat documentation built on Aug. 22, 2023, 9:12 a.m.