79608079

Date: 2025-05-06 06:12:50
Score: 0.5
Natty:
Report link
import exceljs from "exceljs";
import { log } from "node:console";

const { Workbook } = exceljs;
const workbook = new Workbook();

const file = 'files/simpleNameValues.csv';
const options = {
    map(value) {
        return String(value); // Ensure that value is treated as String (81E2) instead of Number (8100)
    }
};
const worksheet = await workbook.csv.readFile(file, options);
worksheet.eachRow((row, rowNumber) => {
    log(row.values);
});

This works!

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Mrigank Vallabh