1

I'm trying to import excel data into my angular app using this library:

xlsx

But when I downloaded the project and tried to run locally,when uploading the excel file I'm getting this error:

Uncaught SecurityError: Failed to construct 'Worker': Script at 'file:///E:/Experiments/js-xls-master/xlsworker2.js' cannot be accessed from origin 'null'. Has anyone faced similar kind of issues or have used this library request you to share the thoughts for the above problem.

1 Answer 1

2

You cannot run a WebWorker from a file:// URL

A simple workaround is to run a local HTTP server in your project directory and access the site from the http URL

python -m SimpleHTTPServer

Your site will be available at http://0.0.0.0:8000

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.