The path to the Excel file to read.
A Promise that resolves to a record where each key is the name of a worksheet and its value is a 2D array of strings representing the rows and cells of the worksheet.
This function uses the exceljs
library to read the Excel file. It will throw an error if the file does not exist or is not a valid Excel file.
Will throw an error if the file does not exist or is not a valid Excel file.
readExcelFile('path/to/file.xlsx').then((worksheets) => {
console.log(worksheets['Sheet1']); // logs the content of 'Sheet1'
});
Generated using TypeDoc
Reads an Excel file and returns its content as a record where each key is the name of a worksheet and its value is a 2D array of strings representing the rows and cells of the worksheet.