In Spread, the duplicate data can be highlighted using conditional formatting. However, if there is a large amount of data, removing duplicate data is always preferred to ease data analysis.
With Spread for WinForms, you can permanently delete the duplicate data from the selected range using the "Remove Duplicates" option. When you remove the duplicate data or values from the selected range, the only effect is on the values in the cell range. Other values outside the range do not change or move. When the duplicate data is removed, the first occurrence of the value in the list is kept, but other identical values are deleted.
You can set the RemoveDuplicates method from IRange interface to remove the duplicate data from the range of cells by specifying the target range.
The following image shows the data before and after it has been modified using code:
You can enable the built-in remove duplicates dialog box using the RemoveDuplicates method of the BuiltinDialogs class at run-time.
The following code example shows how to use the runtime dialog box in a Spread worksheet:
Spread for WinForms designer provides the "Remove Duplicates" ribbon button under the "Data" > "Data Tools" tab group.
The following GIF illustrates the removal of duplicates data from the selected range of data.
You can also choose to ignore the first row by selecting the "My Data has Headers" checkbox option.
The formula in the cell after the duplicate cell is copied over. The following GIF illustrates the use of "Remove Duplicates" in the range of cells where a formula is applied for the Fibonacci series.
As observed, when the "Remove Duplicates" feature is implemented, it removed 'B2' and copies 'B3' to 'B2' and each next cell moves forward by one, changing "B3" to "=B1+B2".
If the value of a cell is the same as that of another cell in the select range, formatting and style are not considered as different cells, and they are removed along with the value.
As observed, the cells have different formatting even though the value of the cells is 1,2, and 3. After implementing Remove Duplicates, all the same value cells are removed.
While using remove duplicates, if you select one or more columns of the table and click on remove duplicates, then the selection is expanded to select the whole table.
While using remove duplicates, if you select a range of cells from a table that contains a total row then the total row is not ignored and the duplicate values are removed as well.
If a single row is selected.
If the selection does not contain any data.
If a single cell is selected.
If multiple ranges are selected.