Function parseWorkbook

  • Parses an Excel workbook and extracts data from each sheet.

    Parameters

    • workbook: Workbook

      The Excel workbook to parse.

    • OptionalheaderRow: number = 1

      The row number to use as the header row. Defaults to 1.

    Returns Promise<Record<string, {
        data: Cell[][];
        headers: string[];
    }>>

    A promise that resolves to an object where each key is a sheet name and the value is an object containing: - headers: An array of header strings. - data: A 2D array of Cell objects representing the data rows.

    const parsedData = await parseWorkbook(workbook);
    console.log(parsedData);