Skip to content

OSPSuite.R.Services.DataImporterTask.ImportExcelFromConfiguration should throw an error when specified sheets are not found #2788

@PavelBal

Description

@PavelBal

When trying to load data from a sheet that does not exist in the excel file, the importer just silently returns nothing. Instead, an error should be thrown.

configurationPath <- getTestDataFilePath(
  "dataImporterConfiguration_noSheets.xml"
)
xlsFilePath <- getTestDataFilePath("CompiledDataSet_oneSheet.xlsx")
importerConfiguration <- loadDataImporterConfiguration(configurationPath)

importerConfiguration$sheets <- "blubb"

dataSets <- loadDataSetsFromExcel(
    xlsFilePath = xlsFilePath,
    importerConfigurationOrPath = importerConfiguration,
    sheets = NULL
  )

> dataSets
named list()

Metadata

Metadata

Assignees

No one assigned

    Labels

    RIssues for R functionalitydev-onlyAssign to issues that do not need to be included in any release notes

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions