XLSX to XML
You need to convert one or more XLSX file to an XML format.
Inputs
Input example
json
{
"name": "file-conversion-xlsx-to-xml",
"taskReferenceName": "xlsx_to_xml",
"description": "The business description of the task",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"mode": "FILE",
"file": "${previous_taskReferenceName.output.file}",
"sheets": [
{
"name": "Test",
"areas": [
{
"startColumn": 1,
"endColumn": 2,
"startLine": 1,
"endLine": 5
}
]
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
json
{
"name": "file-conversion-xlsx-to-xml",
"taskReferenceName": "xlsx_to_xml",
"description": "The business description of the task",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"mode": "FILES",
"files": "${previous_taskReferenceName.output.files}",
"sheets": [
{
"name": "Test",
"areas": [
{
"startColumn": 1,
"endColumn": 2,
"startLine": 1,
"endLine": 5
}
]
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Definition
Property | Type | Required | Description |
---|---|---|---|
The name (or type) of the task | |||
The unique name of the task in your job. It is used to reference this task in the workflow. | |||
The functional description of this task in your job. | |||
The type of the task. It must be SUB_WORKFLOW . | |||
true : the job continues if there is an error on this task. false : the job fails. | |||
Input parameters of the task. See below |
Input definition
Property | Type | Required | Description |
---|---|---|---|
A valid xlsx input file. It can reference the output of a previous task, example: ${previous_taskReferenceName.output.file} , or a static file, example: file://assets/file.xlsx , or a user input, example: ${workflow.input.input_key} . | |||
A valid list of xlsx input files. It can reference the output of a previous task, example: ${previous_taskReferenceName.output.files} , or a user input, example: ${workflow.input.input_key} . | |||
An array of xlsx sheets | |||
The name of the sheet | |||
An array of objects describing the area to be parsed. | |||
The starting column number of the area to be parsed. | |||
The ending column number of the area to be parsed. | |||
The starting line number of the area to be parsed. | |||
The ending line number of the area to be parsed. |
Outputs
Property | Type | Description |
---|---|---|
file | An XML file as described below. | |
allFilesTransformed | YES | NO . YES : all files have been transformed successfully. NO : at least one file has not been transformed. |
Output file
example
xml
<Xlsx-To-Xml>
<File>
<File-Name>products.xlsx</File-Name>
<Sheets>
<Sheet>
<Sheet-Name>products</Sheet-Name>
<Rows>
<R i="1">
<C j="1">EAN</C>
</R>
<R i="2">
<C j="1">1234567890123</C>
</R>
</Rows>
</Sheet>
</Sheets>
</File>
</Xlsx-To-Xml>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Output file
definition
XPath | Description | Occurs |
---|---|---|
Xlsx-To-Xml | Root of the document. | 1 |
./File | For each file. | 1..* |
./File-Name | Original file name. | 1 |
./Sheets | Sheets. | 1 |
./Sheets/Sheet | Sheet, one by sheet. | 0..* |
../Sheet/Sheet-Name | Sheet name | 1 |
../Sheet/Rows | Rows. | 1 |
../Sheet/Rows/R | R = Row, one by row. | 0..* |
../Sheet/Rows/R/@i | i = line index, start index is 1. | 1 |
../Sheet/Rows/C | C = Column. | 0..* |
../Sheet/Rows/C/@j | j = column index, start index is 1. | 1 |
Limits and additional notes
- The limitation of the input file size is 250 Mb.
FAQ
How to convert XLS files?
For now can’t. Only .xslx files can be converted. Therefore you need to save your file with the .xslx extension.
How to convert CSV files?
You can use the task CSV to XML.
Does the empty lines are exported?
No.
Why is there no <File>
in the generated output file ?
It can be due to the fact that you mentioned a sheet that does not exist in the xlsx file.