excel-to-json-converter-mgk
v1.0.3
Published
Convert Excel (.xlsx/.xls) files into clean JSON data effortlessly.
Downloads
11
Readme
📊 excel-to-json-converter-mgk
Convert Excel (.xlsx / .xls) files into clean, structured JSON with automatic key mapping — works in both Node.js and browser environments.
🚀 Features
✅ Converts Excel (.xlsx / .xls) to JSON
✅ Automatically detects column headers as keys
✅ Works in both Node.js and browser file uploads
✅ Returns data in clean JSON format
✅ Lightweight and dependency-free (only uses xlsx)
📦 Installation
npm install excel-to-json-converter-mgk
##USAGE
import { excelToJson } from "excel-to-json-converter-mgk";
async function handleFileUpload(event) {
const file = event.target.files[0];
const json = await excelToJson(file);
console.log(json);
}
<input type="file" accept=".xlsx,.xls" onChange={handleFileUpload} />