catamphetamine / read-excel-file

Read *.xlsx files in a browser or Node.js. Parse to JSON with a strict schema.
https://catamphetamine.gitlab.io/read-excel-file/
MIT License
301 stars 52 forks source link

RangeError: Maximum call stack size exceeded #78

Closed Khuzha closed 4 years ago

Khuzha commented 4 years ago

Hello! I get this error at working on excel file with 38200 rows:

RangeError: Maximum call stack size exceeded
    at /home/khuzha/bot/node_modules/xpath/xpath.js:2045:20
    at /home/khuzha/bot/node_modules/xpath/xpath.js:131:34
    at /home/khuzha/bot/node_modules/xpath/xpath.js:124:3
    at fn (/home/khuzha/bot/node_modules/xpath/xpath.js:117:22)
    at /home/khuzha/bot/node_modules/xpath/xpath.js:131:2
    at fn (/home/khuzha/bot/node_modules/xpath/xpath.js:117:22)
    at Function.PathExpr.applySteps (/home/khuzha/bot/node_modules/xpath/xpath.js:2044:9)
    at Function.PathExpr.applyLocationPath (/home/khuzha/bot/node_modules/xpath/xpath.js:2078:21)
    at PathExpr.evaluate (/home/khuzha/bot/node_modules/xpath/xpath.js:2091:23)
    at XPath.evaluate (/home/khuzha/bot/node_modules/xpath/xpath.js:1317:25)
    at XPathExpression.evaluate (/home/khuzha/bot/node_modules/xpath/xpath.js:4315:26)
    at Object.exports.selectWithResolver (/home/khuzha/bot/node_modules/xpath/xpath.js:4738:26)
    at /home/khuzha/bot/node_modules/xpath/xpath.js:4730:18
    at Object.select (/home/khuzha/bot/node_modules/read-excel-file/commonjs/xmlNode.js:25:10)
    at parseValues (/home/khuzha/bot/node_modules/read-excel-file/commonjs/readXlsx.js:405:14)
    at readXlsx (/home/khuzha/bot/node_modules/read-excel-file/commonjs/readXlsx.js:52:16)

With small files there is no problem

catamphetamine commented 4 years ago

It's in the readme.

catamphetamine commented 4 years ago

В ридми написано в первом параграфе.

Khuzha commented 4 years ago

Оу, действительно, спасибо. Кстати, возможно, стоит поправить: там речь о 100к+ строках, а у меня, например, крашится на 38к

catamphetamine commented 4 years ago

Обновил.