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.

sheet[cell].v.trim is not a function

See original GitHub issue

I don’t know why when I try to convert some sheets, I got an error :


            rowData[columnData] = (sheet[cell].t == 'n') ? sheet[cell].w.trim()
: sheet[cell].v.trim();

                ^

TypeError: sheet[cell].v.trim is not a function
    at parseSheet (C:\node_modules\convert-excel-to
-json\lib\convert-excel-to-json.js:92:97)
    at sheetsToGet.forEach.sheet (C:\node_modules\c
onvert-excel-to-json\lib\convert-excel-to-json.js:125:38)
    at Array.forEach (native)
    at convertExcelToJson (C:\node_modules\convert-
excel-to-json\lib\convert-excel-to-json.js:120:21)
    at convertXLS2JSON (C:\test.js:30:15)
    at Server.<anonymous> (C:\test.js:200:2)
    at Server.g (events.js:291:16)
    at emitNone (events.js:86:13)
    at Server.emit (events.js:185:7)
    at emitListeningNT (net.js:1288:10)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DiegoZoracKycommented, May 19, 2017

Hi @aTewan,

I made a fix for that. Can you try with the latest version and tell me if everything went well?

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - .trim() is not a function
As you wrote your String into an array you have to get that string via array[0] , since the string is the very...
Read more >
[Solved] TypeError: trim is not a function - ItsJavaScript
The TypeError: trim is not a function occurs if we call a trim() method on the value that is not of a type...
Read more >
value.trim() in not function at types.js:40 · Issue #469
Non-number/string value is allowed through helper/get.js causes runtime error value.trim() is not a function at Fuse/src/helpers/types.js ...
Read more >
TRIM function - Google Docs Editors Help
TRIM removes all spaces in a text string, leaving just a single space between words. Whitespace or non-breaking space will not be trimmed....
Read more >
trim() is not a function
Solved: I have an old Photoshop script from circa 2012 - which I remember working, that uses the trim() function. Strings, not pixels ......
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