I have a column in Excel in which there are numbers of different formats and I need to sort the numbers that have 4 digits. How can this be implemented in StudioX?

Hi @teslyak9437
Try this
(From row In dt.AsEnumerable()
Where row.Field(Of Double)("ColumnName").ToString().Length = 4 AndAlso IsNumeric(row.Field(Of Double)("ColumnName").ToString())
Order By Convert.ToDouble(row.Field(Of Double)("ColumnName"))
Select row).CopyToDataTable()
Input:

Output:

Regards,
It must to implemented in StudioX
Same as studio only
(From row In DT.AsEnumerable()
Where row.Field(Of Double)("ColumnName").ToString().Length = 4 AndAlso IsNumeric(row.Field(Of Double)("ColumnName").ToString())
Order By Convert.ToDouble(row.Field(Of Double)("ColumnName"))
Select row).CopyToDataTable()
I must to delete this value
@teslyak9437 Can you clarify more about the input & output?
Must delete the value means?
Regards,
Ajay Mishra
How about the following?
Dim rowsToDelete = (From row In dt.AsEnumerable()
Where row.Field(Of Double)("ColumnName").ToString().Length = 4 AndAlso IsNumeric(row.Field(Of Double)("ColumnName").ToString())
Select row).ToList()
For Each rowToDelete In rowsToDelete
dt.Rows.Remove(rowToDelete)
Next
Output:

Regards,
It must to implemented in StudioX

It is in studiox only please check
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.



