Function duplicateRow

  • Duplicates a row by inserting a new row at the target position with the same values and styles.

    Parameters

    • ws: Worksheet

      The worksheet containing the rows.

    • sourceRowNumber: number

      The number of the row to copy from.

    • targetRowNumber: number

      The number where the new row should be inserted.

    Returns void

    duplicateRow(worksheet, 1, 5);