Click here to Skip to main content
15,899,314 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionComma with in CSV file Pin
Prajin6-Sep-07 22:51
Prajin6-Sep-07 22:51 
AnswerRe: Comma with in CSV file Pin
Chetan Patel7-Sep-07 0:01
Chetan Patel7-Sep-07 0:01 
GeneralRe: Comma with in CSV file Pin
Prajin7-Sep-07 1:25
Prajin7-Sep-07 1:25 
GeneralRe: Comma with in CSV file Pin
varshavmane7-Sep-07 1:42
varshavmane7-Sep-07 1:42 
GeneralRe: Comma with in CSV file Pin
Prajin7-Sep-07 2:24
Prajin7-Sep-07 2:24 
GeneralRe: Comma with in CSV file Pin
J4amieC7-Sep-07 2:34
J4amieC7-Sep-07 2:34 
GeneralRe: Comma with in CSV file Pin
varshavmane7-Sep-07 2:35
varshavmane7-Sep-07 2:35 
AnswerRe: Comma with in CSV file Pin
Chetan Patel7-Sep-07 3:01
Chetan Patel7-Sep-07 3:01 
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

QuestionGridView Problem Pin
rahuljosh00720006-Sep-07 22:48
rahuljosh00720006-Sep-07 22:48 
AnswerRe: GridView Problem Pin
Sandeep Akhare6-Sep-07 23:35
Sandeep Akhare6-Sep-07 23:35 
AnswerRe: GridView Problem Pin
Chetan Patel7-Sep-07 0:03
Chetan Patel7-Sep-07 0:03 
QuestionMaximum total file size for upload in a form Pin
Yenyen Suwardy6-Sep-07 22:41
Yenyen Suwardy6-Sep-07 22:41 
AnswerRe: Maximum total file size for upload in a form Pin
Sandeep Akhare6-Sep-07 22:59
Sandeep Akhare6-Sep-07 22:59 
QuestionJava Script Related to GridView's Textbox Validation? Pin
sanjay_tutu6-Sep-07 22:23
sanjay_tutu6-Sep-07 22:23 
QuestionWhere the session data will store Pin
spprofile6-Sep-07 22:17
spprofile6-Sep-07 22:17 
AnswerRe: Where the session data will store Pin
Chetan Patel7-Sep-07 0:05
Chetan Patel7-Sep-07 0:05 
Questionasp.net2.0 Pin
rajmani6-Sep-07 22:15
rajmani6-Sep-07 22:15 
AnswerRe: asp.net2.0 Pin
spprofile6-Sep-07 22:24
spprofile6-Sep-07 22:24 
GeneralRe: asp.net2.0 bin folder create but Pin
rajmani6-Sep-07 22:39
rajmani6-Sep-07 22:39 
GeneralRe: asp.net2.0 bin folder create but Pin
Sandeep Akhare6-Sep-07 23:03
Sandeep Akhare6-Sep-07 23:03 
Questionglobal variable resetting?! Pin
2hdass6-Sep-07 21:57
2hdass6-Sep-07 21:57 
QuestionDatagridview checkbox selection Pin
kvijayajyothy6-Sep-07 21:26
kvijayajyothy6-Sep-07 21:26 
QuestionMCTS Certifictaion Pin
onrivman6-Sep-07 21:17
onrivman6-Sep-07 21:17 
AnswerRe: MCTS Certifictaion Pin
varshavmane6-Sep-07 21:26
varshavmane6-Sep-07 21:26 
GeneralRe: MCTS Certifictaion Pin
onrivman6-Sep-07 21:56
onrivman6-Sep-07 21:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.