Get columns from datatable

studio

#1

hi,

i had the following output datatable: Column0,Column1,Column2,Column3,Column4,Column5,Column6,Column7,Column8,Column9,Column10,Column11,Column12,Column13\r\n0,3,0,5,8,3,2,5,8,1,2,8,1,2\r\n

i had to extract 0,3,0,5,8,3,2,5,8,1,2,8,1,2, anybody had an idea


#2

HI @abdel,
Can you try this. yourText.Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries). Hope it works!

Regards
Balamurugan


#3

Thank you,
what is the type of return? string ?


#4

Hi @abdel,
Yes. It will return string array…

Regards
Balamurugan


#5

i had used it but :


#6

HI @abdel,

Can you try Extract(1).ToString
If possible, can you attache the xml please ?

Regards
Balamurugan


#7

extractGTIN.xaml (8.0 KB)


#8

Hi @abdel
xl sheet is missing…


#9

i sent it by msg


#10

Yes i got it.


#11

@abdel

You can directly get it by using
string a =string.Join(",",DataTableVariable.R ow(0).ItemArray)

Regards,
Mahesh


#12

it does not work


#13

HI @abdel,
When you use this “Extract(1).ToString” , you are getting the output. below the screen i have attached.

Regards
Balamurugan.S


#14

HI @abdel,
Here I have attached the xml also.

extractGTIN.xaml (8.3 KB)

Regards
Balamurugan