Function cleanRows

  • Clears the values of specified columns in a range of specified rows.

    Parameters

    • ws: Worksheet

      The worksheet containing the rows and columns.

    • rows: number[]

      An array of row numbers to be cleared (e.g., [5, 6, 10]).

    • Optionalcolumns: string[] = []

      An optional array of column identifiers to clear. If not provided, all cells in the row will be cleared.

    Returns void

    cleanRows(worksheet, [5, 6, 10]);
    cleanRows(worksheet, [5, 6, 10], ['C', 'D', 'E']);