Package 'kwb.readxl'

Title: Read Data From Excel Files
Description: This package is based on the package readxl. It provides functions that read all Excel sheets as pure text and then try to split each sheet into a set of line ranges that are assumed to represent single tables.
Authors: Hauke Sonnenberg [aut, cre] (ORCID: <https://orcid.org/0000-0001-9134-2871>), Michael Rustler [ctb] (0000-0003-0647-7726), Kompetenzzentrum Wasser Berlin gGmbH [cph]
Maintainer: Hauke Sonnenberg <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-05-17 07:27:03 UTC
Source: https://github.com/KWB-R/kwb.readxl

Help Index


Read Excel Sheets into List of Character Matrices

Description

This function reads all (given) sheets of one Excel file into a list of character matrices. The idea of this function is to return the content of the Excel sheets as pure raw text information. No type conversion is performed. Empty rows at the beginning are not skipped which is the default behaviour of read_xlsx that is called under the hood.

Usage

get_raw_text_from_xlsx(file, sheets = NULL, dbg = TRUE)

Arguments

file

full path to Excel file

sheets

name(s) of sheet(s) to be read, in a vector of character. If NULL, all sheets are read.

dbg

if TRUE, debug messages are shown

Examples

# Path to example file
file <- system.file("extdata", "example.xlsx", package = "kwb.readxl")

# Read all sheets
sheet_text <- kwb.readxl::get_raw_text_from_xlsx(file)

# Have a look at the first rows of the first sheet
head(sheet_text$sheet_01)