Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ExcelScript.RemoveDuplicatesResult interface
- Package:
- ExcelScript
Represents the results from Range.removeDuplicates.
Remarks
Used by
Examples
/**
* This script removes duplicate rows from a range.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the used range of the active worksheet.
const usedRange = workbook.getActiveWorksheet().getUsedRange();
// Remove any row that has a same value in the 0-indexed column as a previous row.
const removedResults: ExcelScript.RemoveDuplicatesResult = usedRange.removeDuplicates([0], true);
// Log the count of removed rows.
console.log(`Rows removed: ${removedResults.getRemoved()}.`);
}
Methods
| getRemoved() | Number of duplicated rows removed by the operation. |
| getUniqueRemaining() | Number of remaining unique rows present in the resulting range. |
Method Details
getRemoved()
Number of duplicated rows removed by the operation.
getRemoved(): number;
Returns
number
getUniqueRemaining()
Number of remaining unique rows present in the resulting range.
getUniqueRemaining(): number;
Returns
number
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Scripts
Feedback
Was this page helpful?
