question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] readFile error

See original GitHub issue

readFile gives TypeError: Cannot read property 'F_OK' of undefined

I have

import { Workbook } from "exceljs";
let workbook = new Workbook();
files.forEach((file) => {
const data = workbook.csv.readFile(file.name)
})

Tried with workbook.xlsx.readFile and this gives same error.

I have version 3.8.1 installed.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:21 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
DantSucommented, Jul 7, 2020

Exceljs v4.1.0 : import { Workbook } from 'exceljs/excel' fix the problem with Electron.

5reactions
andreibuboicommented, May 22, 2020

Workaround if using this in electron

        fs.promises.readFile(path)
            .then(data => {
                workbook.xlsx.load(data.buffer)
                    .then()
                    .catch();
            }).catch();
Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Bug in custom fs.readfile callback function to return ...
I am trying to implement a decorator on the fs.readFile function. Instead of the regular error and data params ...
Read more >
Developers - [BUG] readFile error - - Bountysource
readFile gives TypeError: Cannot read property 'F_OK' of undefined. I have import { Workbook } from "exceljs"; let workbook = new ...
Read more >
Error: Can't read file, or Presentation cannot be opened
Right-click the file in File Explorer and select Open. Still having trouble? If you're having a problem with PowerPoint that's not resolved here,...
Read more >
Solved: Mass Effect Readfile Error Crash - Answers HQ
The error message reads: ReadFile beyond EOF 137+4/137 for file C:\Users\Hank\Documents\BioWare\Mass Effect\Save\Profile.MassEffectProfile.
Read more >
FileReader: error event - Web APIs | MDN
The error event is fired when the read failed due to an error (for example, because the file was not found or not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found