Description Usage Arguments Value See Also Examples
xlsxToXML
transforms an xlsx file in the Spanish NSI internal standard
for fwf schemas into an xml file with the following elements:
variable
: the name of the variable.
width
: the number of positions which the values of this variable occupy in the
fwf file.
initialPos
: initial position of the field which the values of this variable
occupy in the fwf file.
finalPos
: final position of the field which the values of this variable occupy in
the fwf file.
type
: type of the variable. It must be either log
, integer
,
num
or char
.
valueRegEx
: regular expression for the values of this variable.
description
: textual description of the variable.
The Excel file must have a header in the second row (according to Spanish NSI internal standard)..
1 2 3 4 5 6 | INExlsxToXML(
xlsxName,
sheetToRead = 1,
xmlName = NULL,
regionName = "METADATOS"
)
|
xlsxName |
Name of the xlsx file containing the schema according to the Spanish NSI standard |
sheetToRead |
Name or index of the sheet in the xlsx file with the schema. |
xmlName |
Name of the xml file to be written. |
regionName |
Name of the region in the xlsx file. |
Write the generated xml file and return an object of class
xml_document-class
.
INExlsxToSchema
INExmlToSchema
1 2 3 | xlsxName <- file.path(system.file('extdata', package = 'fastReadfwf'), 'dr_EESEadulto_2020.xlsx')
xmlName <- file.path(system.file('extdata', package = 'fastReadfwf'), 'dr_EESEadulto_2020.xml')
output <- INExlsxToXML(xlsxName = xlsxName, xmlName = xmlName)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.