إزالة الصفوف المكررة في ورقة عمل باستخدام C++
Contents
[
Hide
]
إزالة الصفوف المكررة هي واحدة من الميزات المفيدة في Microsoft Excel. تسمح للمستخدمين بإزالة الصفوف المكررة في ورقة عمل، ويمكنك اختيار الأعمدة التي يجب فحصها لوجود معلومات مكررة.
يوفر Aspose.Cells طريقة Cells::RemoveDuplicates()
لهذا الغرض. يمكنك أيضًا ضبط startRow
، startColumn
، endRow
، و endColumn
لاختيار الأعمدة.
فيما يلي الملفات العينية التي يمكن تنزيلها لاختبار هذه الميزة:
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// Create workbook
Workbook book(u"removeduplicates.xlsx");
// Remove duplicates from the first worksheet
book.GetWorksheets().Get(0).GetCells().RemoveDuplicates(0, 0, 5, 3);
// Save the result
book.Save(u"removeduplicates-result.xlsx");
std::cout << "Duplicates removed successfully!" << std::endl;
Aspose::Cells::Cleanup();
}