How can i write string data in excel in new line

Hello,

i have data like below in my string

Member

ABC,PQR
AJD,EDC
IDP,VHD
i need to wite data like member as heading and other data in new line in excel like below

help me on same

Hi Mathkar,

You can use Split function and split the string using Environment.newline
For example,
If the input string name is strInput you have use strInput.Split(Environment.newline.ToCharArray)
You can then have a datatable, use forloop and add values in list to datatable
Then You can use Write range and write the data (Disable Add header Checkbox)

Hope this solution works for you!!

1 Like

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