Want to Split this Sentences in Single Cell into Multiple Cells Like this

Screenshot 2022-05-02 182731

1 Like

@Gopikrishna_S

  1. Use Read Cell activity to read the data from cell you want to split it. Let’s say strInput.

  2. And then try below expression to split the text.

             arrValue = strInput.Split(Environment.NewLine.ToCharArray)
    

Note: Here arrValue is of type Array of String.

  1. And then use below expression to convert array into DataTable.

         dtResult = arrValue.Select(Function (x) dtResult.Rows.Add(new Object(){x})).CopyToDataTable
    
  2. Finally use Write Range activity and pass above dtResult to write into Excel file.

Hey @Gopikrishna_S

Are you getting this data from some other source and writing it to Excel which is creating the sheet like this ?

Thanks
#nK

Object reference not set to instance of an object error Comming
Screenshot 2022-05-04 135205

1 Like

Hey @Gopikrishna_S

Could you please expand and show the assign statement

Thanks
#nK

dtResult=arrValue.Select(Function (x) dtResult.Rows.Add(new Object(){x})).CopyToDataTable

@Gopikrishna_S

Create one DataTable using Build DataTable activity and named it as dtResult before that assign activity.

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