I would like to know how to Read values only from specified range of columns using xlsx sheet_to_json
In a excel, read values from D to J using xlsx nodejs
const XLSX = require("xlsx");
const workbook = XLSX.readFile("data.xlxs");
const worksheet = workbook.Sheets["data summary"];
const result= XLSX.utils.sheet_to_json(worksheet,{range: "D:J", blankrows: false });;
you need to use
const result = XLSX.utils.sheet_to_json(worksheet,{header: ['D', 'E', 'F', 'G', 'H', 'I', 'J'], blankrows: false })
where array from 'header' option is the list of columns you want.
Use 'range' option to skip raws from worksheet start.