INExlsxToXML: Transform Spanish NSI fwf schema into an xml file.

Description Usage Arguments Value See Also Examples

View source: R/INExlsxToXML.R

Description

xlsxToXML transforms an xlsx file in the Spanish NSI internal standard for fwf schemas into an xml file with the following elements:

The Excel file must have a header in the second row (according to Spanish NSI internal standard)..

Usage

1
2
3
4
5
6
INExlsxToXML(
  xlsxName,
  sheetToRead = 1,
  xmlName = NULL,
  regionName = "METADATOS"
)

Arguments

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.

Value

Write the generated xml file and return an object of class xml_document-class.

See Also

INExlsxToSchema INExmlToSchema

Examples

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)

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