-
Hi, how to read sheet with multiple rows of header? Is it possible at all? (For example, first row we have gender spanning two cells, second row we have male and female each in one cell, is it possible to preserve this data?) Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
@fnick851 Thank you for asking me 👍 I will attempt to answer you as perfect as I can.
Yes it is by using for instance: {
type: 'list',
worksheet: 'Person',
columns: [
{
index: 1, // column A
key: 'isMale',
mapper: (v: string) => v.toLowerCase() === 'x'
},
{
index: 2, // column B
key: 'isFemale',
mapper: (v: string) => v.toLowerCase() === 'x'
},
{index: 3, key: 'Name'},
],
rowOffset: 2, // ignore first two header rows
}, |
Beta Was this translation helpful? Give feedback.
-
@Siemienik Thanks. Are all cells parsed as string by default without a mapper? |
Beta Was this translation helpful? Give feedback.
-
Default mapper is defined by code Source code: |
Beta Was this translation helpful? Give feedback.
-
@Siemienik Thank you! |
Beta Was this translation helpful? Give feedback.
@fnick851 Thank you for asking me 👍 I will attempt to answer you as perfect as I can.
Yes it is by using
rowOffset: 2
for instance: