xlsx

xlsx is a JavaScript library for parsing and writing Excel (XLSB/XLSX/XLSM/XLS/XML) and ODS spreadsheet files. It enables easy manipulation of spreadsheet data within web browsers or Node.js environments, allowing users to read, modify, and create spreadsheet data efficiently.

Latest Ver 0.18.5
Homepage
Github
0
35,601
Embark on a Voyage through the Sea of Data
Easily manage complex data with the xlsx library.
JavaScript library for handling Excel and ODS files
License: Apache License, Version 2.0
https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/cpexcel.js
https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/cpexcel.min.js
https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/shim.min.js
https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.core.min.js
https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.extendscript.js
https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.extendscript.min.js
https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js
https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.mini.min.js
https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.zahl.js
https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.zahl.min.js

Sample Code

⚠️ Some code, including import statements, may not run properly on jsFiddle. If it fails to execute, please copy the code and try it in your own environment.
📄 HTML
<div id='example'>
  <input type='file' id='input-excel' />
  <button onclick='readFile()'>Read File</button>
  <pre id='output'></pre>
</div>

🧩 External JS
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.0/xlsx.full.min.js"></script>

⚙️ JavaScript
function readFile() {
  var file = document.getElementById('input-excel').files[0];
  var reader = new FileReader();
  reader.onload = function(e) {
    var data = new Uint8Array(e.target.result);
    var workbook = XLSX.read(data, {type: 'array'});
    var first_sheet_name = workbook.SheetNames[0];
    var worksheet = workbook.Sheets[first_sheet_name];
    var output = XLSX.utils.sheet_to_json(worksheet, {header:1});
    document.getElementById('output').innerText = JSON.stringify(output, null, 2);
  };
  reader.readAsArrayBuffer(file);
}
⚡ Top Tools for Developers
Text Compare

Text Comparison

Easily spot the differences between two texts.

Favicon Generator

Favicon Generator

Quickly and easily generate favicons.

Lorem Ipsum Generator

Lorem Ipsum Generator

Generate placeholder text for your designs.

Character Counter

Character Counter

Check character and word count in real time.

SRT ↔ SMI

SRT ↔ SMI Converter

Easily convert between subtitle formats.

Text Extract(OCR)

Image Text Extractor

Automatically extract text from images.