Learn R Programming

flattabler (version 1.2.0)

read_excel_sheet: Import Excel file sheet

Description

Reads an Excel file sheet and creates a pivot_table object. The sheet is expected to contain one or more pivot tables. Each line in the sheet corresponds to a row in a table. The file and sheet names are included as part of the object attributes.

Usage

read_excel_sheet(file, sheetIndex = 1, sheetName = NULL)

Value

A pivot_table object.

Arguments

file

A string, name of an Excel file.

sheetIndex

A number, sheet index in the workbook.

sheetName

A string, sheet name.

Details

When multiple files or sheets are handled, the file and/or sheet names may contain information associated with the pivot table, they could be the table page information. In order not to lose this information, they are always stored in the pivot_table object.

See Also

Other import functions: pivot_table(), read_excel_file(), read_excel_folder(), read_text_file(), read_text_folder()

Examples

Run this code
file <- system.file("extdata", "excel/ine2871.xlsx", package = "flattabler")
pt <- read_excel_sheet(file)

pt <- read_excel_sheet(file, sheetName = "tabla-2871")

Run the code above in your browser using DataLab