Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript read xlsx file

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');
 
PREVIOUS NEXT
Tagged: #javascript #read #xlsx #file
ADD COMMENT
Topic
Name
9+5 =