Spilting a cell into two

Capture

hi folks!!

im having a problem in converting datatable to excel.

i want to spilt profile rate and its value into two and add the value in the respective columns.
please resolve

Hi @kaviuk20

Can you share a sample file, so we can get a chance to try on your scenario

Thanks

1 Like

@kaviuk20

Hello, what is understood from your post is that you want to split cell value into 2 part, one the text and other into numeric, Right?
Solution:

  1. Use Regex to separate the numeric from the cell value and store it in a variable say “num_val”
  2. left(cell value, len(cell value)- len(num_val.ToString)) and store this in another variable

I hope this way you can solve it, if i got your question right.

1 Like

Hi.
I think you can split text by the new line.
Note please.


The cell range in Read Cell & Write Cell is here: “A”+(dt.Rows.IndexOf(row)+1).ToString
The split expression in Assign is here: test.Split(Environment.NewLine.TocharArray)

1 Like