Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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');
 
PREVIOUS NEXT
Tagged: #xlsx #json #javascript
ADD COMMENT
Topic
Name
3+4 =