sheet[cell].v.trim is not a function
See original GitHub issueI 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:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @aTewan,
I made a fix for that. Can you try with the latest version and tell me if everything went well?
Got it! Thanks for the extra info @aTewan . Fixed: https://github.com/DiegoZoracKy/convert-excel-to-json/commit/f1de48912843403a0c1c413b3ad64b22d14418a6