I want to import an xlsx file into my website and based it on this. However, whatever filename and path I put in, it gives me this error:
TypeError: Cannot read properties of undefined (reading 'F_OK')
The part in question looks like this:
const Excel = require('exceljs')
var workbook = new Excel.Workbook();
workbook.xlsx.readFile('spielplan.xlsx')
I have tried moving the file into different directories and using their paths, tried it from the directory itself, and have tried to give the absolute file path. Every time the same error mentioned above pops up.
What am I doing wrong?