ワークシート内の重複行を削除する
Contents
[
Hide
]
重複する行を削除することは、Microsoft Excelの多くの便利な機能の1つです。 これにより、ワークシート内の重複する行を削除でき、重複する情報がチェックされるべき列を選択できます。
Aspose.Cellsはこの目的のためにCells.RemoveDuplicates()メソッドを提供します。また、startRow、startColumn、endRow、endColumnを設定して列を選択することもできます。
これがこの機能のテストにダウンロードできるサンプルファイルです。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
//Create workbook | |
Workbook book = new Workbook("removeduplicates.xlsx"); | |
//Remove Duplicate | |
book.Worksheets[0].Cells.RemoveDuplicates(0 ,0, 5, 3); | |
//Save result | |
book.Save("removeduplicates-result.xlsx"); |