I try to use the data of an existing excel file in a react native application. I tried with xlsx and Exceljs but each time I had mistakes. What is the best way to use Excel data (This means retrieving data from each cell in the excel table) in a reactnative application please ?
This is an example of a code that I tried to use, but it's wrong (I have the following mistake: Unhandled promise rejection, [TypeError: undefined is not an object (evaluating 'i.constants.F_OK')]
)
var Excel = require('exceljs');
var workbook = new Excel.Workbook();
workbook.xlsx.readFile("Liste_qcm2.xlsx")
.then(function() {
ws = workbook.getWorksheet("Sheet1")
cell = ws.getCell('A1').value
console.log(cell)
});
thank you in advance