إزالة الصفوف المكررة في ورقة العمل باستخدام Node.js عبر C++
إزالة الصفوف المكررة هي واحدة من الميزات المفيدة في Microsoft Excel. تتيح للمستخدمين إزالة الصفوف المكررة في ورقة العمل، ويمكنك اختيار الأعمدة التي يجب فحصها للتكرار.
يوفر Aspose.Cells for Node.js via C++ طريقة Cells.removeDuplicates()
لهذا الغرض. يمكنك أيضًا تعيين startRow
، startColumn
، endRow
، و endColumn
لتحديد نطاق الأعمدة المراد فحصها للتكرار.
فيما يلي الملفات العينية التي يمكن تنزيلها لاختبار هذه الميزة:
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "removeduplicates.xlsx");
// Create workbook
const book = new AsposeCells.Workbook(filePath);
// Remove Duplicate
book.getWorksheets().get(0).getCells().removeDuplicates(0, 0, 5, 3);
// Save result
book.save("removeduplicates-result.xlsx");