Data View returning values instead of text

Hello All,

I am extracting a few columns from a datatable using dataview and creating a smaller datatable. However, the new datatable is having values instead of text.

code is as follows
DT2 = New DataView(DT1.ToTable(False,DT1.Columns(0).ColumnName, DT1.Columns(1).ColumnName)

these 2 columns are datatype and when I writeRange DT2 to excel I get values for column 1 and 2 instead of Date Text.

Please help

Hi @preetith

I am not cleared with ur point

What u mean text instead of value here?

When values are pasted in excel, they can pasted as text or their “values”. Especially for Dates, the values will be very different (epoc values) The dataview is giving that value

Dear all,
Someone please help me change below code to retain the date values of Column 0 and Column 1

DT2 = New Data View (DT1.ToTable(False, New List(OfString)({DT1.Columns(0).ToString, DT1.Columns(1).ToString}).ToArray)

Hi @preetith

You can try the same with Filter data table activity to filter the columns.


DT2 = DT1.DefaultView.ToTable(False, DT1.Columns(0).ToString, DT1.Columns(1).ToString)

Thanks for the response. Still same error…
It is do with the date columns only.

solved. Need to set “preserve format” while using “read range” activity.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.