ExcelScript.RemoveDuplicatesResult interface
表示 来自 Range.removeDuplicates
的结果。
注解
示例
/**
* 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()}.`);
}
方法
get |
由操作删除的重复行数。 |
get |
所生成的区域中存在的剩余唯一行数。 |
方法详细信息
getRemoved()
由操作删除的重复行数。
getRemoved(): number;
返回
number
getUniqueRemaining()
所生成的区域中存在的剩余唯一行数。
getUniqueRemaining(): number;
返回
number