Data table extraction Issue

Hi ,
I am trying to extract data from a table only 1 column I am trying to extract using data extraction method but somehow getting commas in the name due to which while writing the Data Table in excel getting issues.


If you see against name at the end or at the beginning getting commas and due to this .after put this dt in excel UI see results like


this is how it is getting added in the excel .
can you suggested to solve this commas is not available in table we are extraction from.
tried LInq query but that didnt helped

Hi,

Can you try the following expression?

dt = dt.AsEnumerable.Select(Function(r) dt.Clone.LoadDataRow({r(0).ToString.Trim+r(1).ToString.Trim},False)).CopyToDataTable

image

Sample
Sample20240125-9a.zip (3.0 KB)

Regards,

1 Like

@Yoichi - This is giving me error in assign activity .

Hi @shashank_dullu

It was saying there is no column1 in the datatable.

Check the datatable has columns or not, to check write the datatable to excel by using write range workbook activity and check the Excel data.

Hope it helps!!

Hi,

This error shows the datatabel has just 1 column. Does your issue always occur? If it’s not always, can you try to add the following IF activity to check number of columns is larger than 1.

Sample
Sample20240125-9aV2 (2).zip (3.1 KB)

Regards,

1 Like

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