Read Data From Excel

Are you using Bower or npm? If not, use the Browser part of the installation instructions

Is there a easier to do this? I kinda don’t understand it. Sorry for being this way but I dont understand

Sometimes people pay others to do the work for them. However, doing it yourself is the best way to learn how to do this, and gives you highly useful skills that help you use the incredible world of code libraries that are out there as well.

It makes sense to use the js-xlsx version too, as that supports xls as well as xlsx

Let’s make this simpler for you. What does the installation section say to do in the browser part of it?

I get it. I tried before I cam to ask for help but could not make it work. I did instal using the npm on my browser

Are you using Node for the rest of your javascript project?

Yes I think but I’m not familiar with node. I’m basic with it

Let’s keep this simple and not use Node or NPM. For what you’re doing those are extra confusions that are not needed at this stage.
Instead, just go with the browser version.

Okay I will use the broswer version What should i do next?

What does the installation section say to do, in regard to the browser?

Please help. I don’t know

Go to the installation section and look where it says “In the browser:”
What is the single line of HTML code that it shows below that line?

Come on - you can do this.

1 Like

I did that

<script lang="javascript" src="dist/xlsx.core.min.js"></script>

Good one. Do you know how to get that dist/xlsx.core.min.js file?

If not, the top of the page has a large green button that lets you download the whole library as a zip file.
You will only need to extract one file from that zip, which is the dist/xlsx.core.min.js file.

Do you need help with getting and extracting that file?

1 Like

Finish doing that. What’s next?

The next step is the Parsing workbooks section of the installation instructions.

There are Node and Browser DOM table sets of instructions there. Both don’t seem to be suitable for what you are doing.

Instead, you can ignore the first line of the Node instructions (the require line), as you are already using the HTML code to load the library. That’s the only Node specific part of that.

It’s just the second line from that Node example that you will be needing to read the workbook.

1 Like

Can you help me with this part?

Sure thing - what is the second line from that Node example, in the Parsing workbooks section?

1 Like

Should put this in the body?

if(typeof require !== 'undefined') XLSX = require('xlsx');
var workbook = XLSX.readFile('test.xlsx');

Or save it as a separate file?

No, you got it wrong.

I asked you for only the second line from that Node example, in the Parsing workbooks section.

What is that second line?