File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " generic-functions.mlai" ,
3
- "version" : " 0.0.4 " ,
3
+ "version" : " 0.0.45 " ,
4
4
"description" : " Some generic functions that can be used by anyone" ,
5
5
"main" : " dist/cjs/index.js" ,
6
6
"module" : " dist/esm/index.js" ,
Original file line number Diff line number Diff line change @@ -832,10 +832,9 @@ export function $ExcelToJson(pathOfFile: any) {
832
832
val = worksheet [ z ] . v ;
833
833
834
834
//header names
835
- let colName = headers [ col ] ;
836
835
if ( row == 1 ) {
837
836
// if val have '\n' in the string
838
- if ( val ) colName = $removeBreakLines ( val ) ;
837
+ if ( val ) headers [ col ] = $removeBreakLines ( val ) ;
839
838
continue ;
840
839
}
841
840
if ( ! val || val == '' ) val = false ;
@@ -844,7 +843,7 @@ export function $ExcelToJson(pathOfFile: any) {
844
843
// tbData[row] = object identifier (aka: {code: 6})
845
844
if ( ! tbData [ row ] ) tbData [ row ] = { } ;
846
845
// value of column
847
- tbData [ row ] [ colName ] = val ;
846
+ tbData [ row ] [ headers [ col ] ] = val ;
848
847
}
849
848
850
849
//remove first two rows because empty
You can’t perform that action at this time.
0 commit comments