I try to separate a data table by values from a column. I have the “Tipo Cambio” column with diferent values and I try to get the values for each “Tipo de Cambio”. The column “Tipo de Cambio” is dynamic so I can´t use the value inside to filtered.
What does this mean? Get them how? To use them for what?
Did you Read Range the spreadsheet into a datatable? If so then you can For Each Row in Data Table to get the data for each row, and it would be CurrentRow(“Tipo Cambio”).ToString to get that column’s value.
DistinctValues = dt.DefaultView.ToTable(True, “Tipo de Cambio”)
For Each row In DistinctValues.Rows
FilteredDataTable = dt.Select(“Tipo de Cambio = '” & row(“Tipo de Cambio”).ToString & “'”).CopyToDataTable
’ Process the filtered DataTable as needed (e.g., write it to a separate file)