Open phochste opened 3 years ago
That's what the 'fields' attribute is for if there is no header (fields: "A,B,C"
), header: 1
should also do the trick if there is a header column.
brol.xlsx It is a weird behavior:
$ catmandu convert XLSX --header 1 to YAML < brol.xlsx
---
A: X
C: X
...
---
A: Y
B: Y
C: Y
...
whereas
catmandu convert XLSX --header 1 to CSV < brol.xlsx
A,C
X,X
Y,Y
Adding --header=1
doesn't help..one needs to first inspect the xlsx file in a desktop program to discover all the fields and then use it. This is an other behavior than working with CSV files which always seem to know which fields are available in the file.
XLSX import works fine, you're expecting the CSV exporter to magically know which columns there are.
I guess the XLSX imported should have much better column metadata then the other formats and should know which fields are available in the file.
E.g.
Will result in