convert-excel-to-json
convert-excel-to-json copied to clipboard
Option to transform data during conversion
Example:
columnToKey: {
A: 'id',
B: 'name',
C: {
property: 'phoneNumber',
transform: (value, row) => value.toString() // 'row' would be the entire row with all its columns (it could be used to concatenate with values from other columns for example).
}
}
Based on the idea described here:
https://github.com/DiegoZoracKy/convert-excel-to-json/issues/3#issuecomment-319845759
Hello, i'm getting this error TypeError: columnData.match is not a function, when i'm using columnToKey can you help me?
Hi @Abhay2012, can you post here to me the snippet of code where you are calling the function? Also, can you open a new issue for us to talk about your case? This one is specific for the feature request described above.
One more use case where this feature would be helpful: https://github.com/DiegoZoracKy/convert-excel-to-json/issues/12
I got the same error
columnData.match is not a function
Could you explain on doc?
Hi @thearabbit,
Can you post here the config you passed in to this module that resulted in columnData.match is not a function
?