StxlsxToSchema: Build an object of class StfwfSchema.

Description Usage Arguments Value Examples

View source: R/StxlsxToSchema.R

Description

XLSToSchema is a constructor of the class StfwfSchema.

This constructor reads an Excel file containing partially or totally the schema of the fixed-width file to read. This file must contain a tag with name Schema (en) or DiseñoRegistro (sp) and the following named columns:

The tag must have a header in file 1. Only English is supported so far.

Usage

1
StxlsxToSchema(xlsxName, sheetToRead, header = TRUE, lang = "en", ...)

Arguments

xlsxName

Name of the xlsx file containing the schema.

sheetToRead

Name or index of the sheet of the xlsx file.

header

Does the first data line contain column names? Defaults to TRUE.

lang

Character vector of length 1 indicating the language for the header in the xlsx file (English: en).

...

Extra arguments for fread.

Value

Return an object of class StfwfSchema.

Examples

1
2
path <- system.file('extdata', package = 'fastReadfwf')
StxlsxToSchema(file.path(path, 'SchemaSNHS.xlsx'), 'stSchema')

david-salgado/fastReadfwf documentation built on Dec. 25, 2021, 12:43 p.m.