createImporterConfigurationForFile: Create a 'DataImporterConfiguration' for an XLS sheet

View source: R/utilities-data-importer-configuration.R

createImporterConfigurationForFileR Documentation

Create a DataImporterConfiguration for an XLS sheet

Description

Create a DataImporterConfiguration for an XLS sheet

Usage

createImporterConfigurationForFile(filePath, sheet = NULL)

Arguments

filePath

Path to XLS file

sheet

optional - name of the sheet. If no sheet is specified, the first sheet of the XLS file is used.

Details

The function tries to parse the structure of the excel sheet and creates a default configuration for this sheet. It is advised to check the configuration and adjust if necessary before using with loadDataSetsFromExcel().

Value

DataImporterConfiguration object for XLS file to be used in loadDataSetsFromExcel().

Examples

xlsFilePath <- system.file("extdata", "CompiledDataSet.xlsx", package = "ospsuite")
importerConfiguration <- createImporterConfigurationForFile(xlsFilePath)
importerConfiguration$sheets <- "TestSheet_1"

dataSets <- loadDataSetsFromExcel(
  xlsFilePath = xlsFilePath,
  importerConfigurationOrPath = importerConfiguration,
  importAllSheets = FALSE
)

Open-Systems-Pharmacology/OSPSuite-R documentation built on April 28, 2024, 2:24 a.m.