Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript Help with average calculation from an excel file using nodejs

hi guys pls advise i am trying to calculate a students average from an excel file but i kind of got stuck
right after i managed to install the excel node js package and read the file
JavaScript:
const Excel     = require("xlsx");
const workBook = XLSX.readFile("Excel/Avg.xlsx");
from here how to continue ???
 
This seems to be the package you installed.

Have you tried checking the readme?

I am not familiar with this package, so I can't really help you with this, but they have a quite lengthy docs page, should probably have what you're looking for.
 
This seems to be the package you installed.

Have you tried checking the readme?

I am not familiar with this package, so I can't really help you with this, but they have a quite lengthy docs page, should probably have what you're looking for.
still cant figure it out how to do what i need to
 
never mind i managed to finish it now different issue cant manage to code the start button so the cube will run as a coundown stopper
timer.png
by pressing start the cube needs to show 10 9 8 7 6 etc until it reached 0
 
You can do something like this:
JavaScript:
const start = document.getElementById("start");       //start button
const count = document.getElementById("count");       //countdown output

start.addEventListener("click", () => {               //run countdown when start button is clicked
  let time = 10;                                      //start countdown at 10
  countdown = setInterval(() => {                     //run this every second
    count.innerHTML = time;                           //output time left
    time == 0 ? clearInterval(countdown) : time--;    //stop timer if time = 0, otherwise decrement time
  }, 1000);                                           //repeat after 1000 milliseconds
});
 

Buy us a coffee!

Back
Top Bottom