Answers for "xlsx to json javascript"

0

xlsx to json javascript

const xlsx = require('xlsx');

const xlsxToJson = (filePath, sheetName) => {
  const workbook = xlsx.readFile(filePath);
  const sheet = workbook.Sheets[sheetName];
  return xlsx.utils.sheet_to_json(sheet);
};

const jsonSheet = xlsxToJson('./test.xlsx', 'Sheet1');
Posted by: Guest on April-26-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language