ワークシート内の重複行を削除する
Contents
[
Hide
]
重複する行を削除することは、Microsoft Excelの多くの便利な機能の1つです。 これにより、ワークシート内の重複する行を削除でき、重複する情報がチェックされるべき列を選択できます。
Aspose.Cells for Python via .NETでは、この目的のためにCells.remove_duplicates()メソッドが提供されています。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
from aspose.cells import Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# Create workbook | |
book = Workbook("removeduplicates.xlsx") | |
# Remove Duplicate | |
book.worksheets[0].cells.remove_duplicates(0 , 0, 5, 3) | |
# Save result | |
book.save("removeduplicates-result.xlsx") |