Problem reading xls file in node js, file header starts from row 1, because row 0 contains value in col 1 only in rest of the columns are blank

Viewed 81

this is how my xls file look like 1st contain value client Aum actual data starts from row 2

const read_xls = async(filePath)=>{
var workbook = XLSX.readFile(filePath);
var sheet_name_list = workbook.SheetNames;
var xlData = XLSX.utils.sheet_to_json(workbook.Sheets[sheet_name_list[0]]);
return xlData;};

this is my code for reading xls file which gives output

{
    "ClientAUM": "Product Code",
    "__EMPTY": "Fund",
    "__EMPTY_1": "Number",
    "__EMPTY_2": "Code,
    "__EMPTY_3": "Option",
    "__EMPTY_4": "Description",
    "__EMPTY_5": "Balance",
    "__EMPTY_6": "Pledged",
    "__EMPTY_7": "Date",
    "__EMPTY_8": "Type",
    "__EMPTY_9": "Hold Mode",
    "__EMPTY_10": "Agent Code",
    "__EMPTY_11": "Broker Code",
    "__EMPTY_12": "P-OUT Code",
    "__EMPTY_13": "Investor ID",
    "__EMPTY_14": "Name",
    "__EMPTY_15": "Address #1",
    "__EMPTY_16": "Address #2",
    "__EMPTY_17": "Address #3",
    "__EMPTY_18": "City",
    "__EMPTY_19": "Pincode",
    "__EMPTY_20": "Phone Residence",
    "__EMPTY_21": "Phone Office",
    "__EMPTY_22": "Fax",
    "__EMPTY_23": "Email",
},
0 Answers
Related