I have an excel file like this
Depart Air (Connecting Point)
TPE NRT TPE Null Null
KHH Null Null
CTS NRT TPE
Null KHH
HKD NRT TPE
Null KHH
KIX TPE
OKA TPE Null
NRT TPE
Null KHH
KIX TPE Null
NRT TPE
Null KHH
ASJ NRT TPE
Null KHH
KIX TPE
KIX TPE Null Null
NRT TPE Null
KHH Null
KIX TPE
OKA TPE
HKD KIX TPE
NRT TPE
Null KHH
ASJ KIX TPE
NRT TPE
Null KHH
OKA TPE Null Null
NRT TPE Null
KHH Null
OKA TPE
I want to convert excel file to 5 object, each row will become one object for example
let object_one = ["TPE"]
let object_two = [{idx:0, name :'NRT'}, {idx:0, name :'KIX'}, {idx:0, name :'OKA'}]
let object_three =[{idx:0, name :'TPE'}] // idx same position with parent index
I know how to read excel file but I don't know how to detect merged cell in nodejs, because my file can be change so i can't hard code here.
via Ihenry
No comments:
Post a Comment