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.

TypeError !CompObj is not a function

See original GitHub issue

Getting the above error with the following code:

Excel = require('xlsjs')
try
   workbook = Excel.readFile(uploadPath)
   console.log(workbook)
catch e
   console.log(e)

Also when I try the official demo with the same file, the error pops up in the console. The file is not corrupted and it happens with all files of the same type.

Any ideas?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SheetJSDevcommented, Feb 10, 2017

@chaostheory newer versions of excel are not capable of generating BIFF2-4 files. They use a newer format (BIFF5 or BIFF8) which is why re-saving the file seems to fix the issue.

@JanSchuermannPH @Mithgol as part of this fix, we also added direct BIFF2 exports and filled some missing record types. The updated write script generates an xls file compatible with Excel 2.0

1reaction
SheetJSDevcommented, Feb 4, 2017

@Mithgol That’s one approach, but I’m leaning towards tweaking the CFB parser to add a unique field and check for that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >
TypeError: Object.entries is not a function - Stack Overflow
On mdn docs, there is a clear tutorial on Object.entries, and it is described what to be done if Object.entries is not supported...
Read more >
How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript TypeError: "x" is not a function occurs when calling a function on a value or object, which is not actually a...
Read more >
TypeError: Object.fromEntries is not a function - Microsoft Learn
I am trying to setup my dev environment for SPFx development. I ran this command "npm install -g gulp yo @microsoft/generator-sharepoint" and ...
Read more >
JavaScript: Uncaught TypeError: n is not a function
Uncaught TypeError: 'n' is not a function: This is a standard JavaScript error when trying to call a function before it is defined....
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