Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Removing duplicate rows is one of Microsoft Excel’s many useful features. It allows users to remove duplicate rows in a worksheet, and you can select which columns should be checked for duplicate information.
Aspose.Cells provides the Cells::RemoveDuplicates() method for this purpose. You can also specify startRow, startColumn, endRow, and endColumn to define the range.
The following sample file can be downloaded for testing this feature:
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
<span class="c1">// Create workbook
Workbook book(u"removeduplicates.xlsx");
<span class="c1">// Remove duplicates from the first worksheet
book.GetWorksheets().Get(0).GetCells().RemoveDuplicates(0, 0, 5, 3);
<span class="c1">// Save the result
book.Save(u"removeduplicates-result.xlsx");
<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o"><<</span> <span class="s">"Duplicates removed successfully!"</span> <span class="o"><<</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="n">Aspose</span><span class="o">::</span><span class="n">Cells</span><span class="o">::</span><span class="n">Cleanup</span><span class="p">();</span>
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.