xlsx_names {tidyxl}R Documentation

Import named formulas from xlsx (Excel) files

Description

xlsx_names() returns the names and definitions of named formulas (aka named ranges) in xlsx (Excel) files.

Most names refer to ranges of cells, but they can also be defined as formulas. xlsx_names() tells you whether or not they are a range, using is_range() to work this out.

Names are scoped either globally (used only once in the file), or locally to each sheet (can be reused with different definitions in different sheets). For sheet-scoped names, xlsx_names() provides the name of the sheet.

Usage

xlsx_names(path, check_filetype = TRUE)

Arguments

path

Path to the xlsx file.

check_filetype

Logical. Whether to check that the filetype is xlsx (or xlsm) by looking at the file itself, rather than using the filename extension.

Value

A data frame, one row per name, with the following columns.

Examples

examples <- system.file("extdata/examples.xlsx", package = "tidyxl")
xlsx_names(examples)

[Package tidyxl version 1.0.10 Index]