Skip to content
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

Stuck in transformExcelToLucky() when processing Excel files containing images from Node server #93

Open
Akash0463 opened this issue Jul 30, 2023 · 0 comments

Comments

@Akash0463
Copy link

Akash0463 commented Jul 30, 2023

When attempting to process Excel files containing images using the transformExcelToLucky() function from the Node server, the operation gets stuck and does not complete. This issue seems to be specific to Excel files that include images as part of their content.

node version - 14.19.1
luckyexcel - 1.0.1

seems to be the issue in generateRandomIndex() -> var userAgent = window.navigator.userAgent.replace(/[^a-zA-Z0-9]/g, "").split("");

window object will not be available in case of server call

function generateRandomIndex(prefix) {
    if (prefix == null) {
        prefix = "Sheet";
    }
   // window object will not be available in case of server call
    var userAgent = window.navigator.userAgent.replace(/[^a-zA-Z0-9]/g, "").split("");
    var mid = "";
    for (var i = 0; i < 5; i++) {
        mid += userAgent[Math.round(Math.random() * (userAgent.length - 1))];
    }
    var time = new Date().getTime();
    return prefix + "_" + mid + "_" + time;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant