for (int j = 0; j < rows.Length; j++) { string[] columns = rows[j].Split(','); if (dtCustomer.Columns.Count == columns.Length) { dtCustomer.Rows.Add(columns); } } change your code like this arrTemp[]=rows[j].Split("'") you get three parts 1,'abc,def',asd as 1, abc,def ,asd now add this like this for (int j = 0; j < rows.Length; j++) { arrTemp[]=rows[j].Split("'") dtCustomer.Rows.Add(arrTemp[0].subString(1,arrTemp[0].Length-1); dtCustomer.Rows.Add(arrTemp[1]); dtCustomer.Rows.Add(arrTemp[2].subString(2); }
Best Regards, Chetan Patel