-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing functions #89
Comments
Try to put a key "GAMA.INV" like:
let directkeys = {};
directkeys["GAMA.INV"] = formulas.GAMA.INV;
// import that directkeys formula
Em dom, 29 de mai de 2022 13:55, anolan23 ***@***.***>
escreveu:
… Here is the formulajs object printed to console showing that GAMMA.INV
exists when I import_functions
[image: image]
<https://user-images.githubusercontent.com/57581908/170882121-d4a4d13a-4812-4013-aca7-d7bf8e61b03d.png>
—
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABVNEBQB4QYJCGK2BL5EKLVMOOQXANCNFSM5XHMKIAQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
const XLSX = require('xlsx');
const XLSX_CALC = require('xlsx-calc');
const formulajs = require('@formulajs/formulajs');
XLSX_CALC.import_functions(formulajs, { override: true });
let directkeys = {};
directkeys['GAMMA.INV'] = formulajs.GAMMA.INV;
// import that directkeys formula
XLSX_CALC.import_functions(directkeys);
const workbook = XLSX.readFile('backend/excel/calc.xlsm'); I'm trying this right now. I'll try |
Using your suggestion I waited 45 minutes to receive response from that endpoint before I stopped it in Postman. No error the whole time, but it just hangs. How long can the recalculate take? import_raw_functions didn't solve it either. |
link to stackoverflow question |
var mymodule = function(workbook) {
var formulas = find_all_cells_with_formulas(workbook, exec_formula);
for (var i = formulas.length - 1; i >= 0; i--) {
exec_formula(formulas[i]);
console.log(i)
}
}; @fabiooshiro by adding a console log, I figured out that the excel file had 1.25 million formulas that needed to be executed. After 2 hours it finally finished recalculating. Nice. However, let's say I reduce that calculation time to only a minute by removing a lot of formulas. This is still a synchronous calculation intensive process. Wouldn't this be blocking the single thread of the node.js server? Meaning other requests to server will have to wait for this to finish. I guess I'm trying to evaluate when the usage of this npm package will be realistic because you can't have blocking of the thread. |
You need to spawn a worker or may use a serverless solution
|
We have some more missing functions:
Example error: |
Happy to assist with adding the above functions. Have no idea how to start though, including where we even find equivalent excel logic for these functions. Need this for a work project, so it is rather urgent. Ready to help ASAP |
I've been stuck for hours on trying to recalculate the workbook which has many references and complex functions.
I'm getting this error after making POST request to
/api/vehicles
even though formulajs HAS this function. Why is it giving me error if the function exists?The text was updated successfully, but these errors were encountered: