Add columns in data table


You have helped me in this post and all good. Thank you

But now business wants to add document, Date, CurrentDate columns from inputsheet. I am not sure how to do that

Expected output :grinning:

How do i add document,Date,current date in below code?

dt = dt.AsEnumerable.Where(Function(r) not String.IsNullOrEmpty(r(“Language”).ToString)).GroupBy(Function(r) r(“Key”).ToString).Select(Function(g) g.OrderByDescending(Function(r) arr.Contains(r(“Language”).ToString)).First).CopyToDataTable

Also document,Date,current date in this code?
dt = dt.AsEnumerable.Select(Function(r) dt.Clone.LoadDataRow({r(0),r(1),r(2),Cint(r(2))+2},False)).CopyToDataTable()


Can you also share input sheet?


newresult.xlsx (6.6 KB)

Thank you… Please find the input file for ModifyExtractedData.Xaml

ModifyExtractedData.xaml (9.6 KB)

Expected output:


Can you try the following?


io_dtModifiedExtractedFile = io_dtModifiedExtractedFile.AsEnumerable.Select(Function(r) io_dtModifiedExtractedFile.Clone.LoadDataRow({r(0),r(1),r(2),Cint(r(2))+2,r(4),r(5),r(6)},False)).CopyToDataTable() (15.3 KB)


1 Like

Thanks a lot

1 Like

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