标签:
在数据后面加上"/t" 或者加上/r 进行转义
Ends.Write(retReader["Statis_dt"].ToString() + ","); Ends.Write(retReader["BranchCode"].ToString() + ","); Ends.Write(retReader["OrganCode"].ToString() + ","); Ends.Write(retReader["Iou_No"].ToString() + "/t,"); Ends.Write(retReader["Contract_No"].ToString() + "/t,"); Ends.Write(retReader["Repay_Term_No"].ToString() + ","); Ends.Write(retReader["Plan_Repay_dt"].ToString() + ","); Ends.Write(retReader["Act_Repay_dt"].ToString() + ","); Ends.Write(retReader["Repay_Capital"].ToString() + ","); Ends.Write(retReader["Loan_Bal"].ToString() + ","); Ends.Write(retReader["Next_Term_Repay_Capital"].ToString() + ","); Ends.Write(retReader["Repay_Status"].ToString() + ","); Ends.Write(retReader["InsertTime"].ToString() + ",");
private void WriteDataLines(StreamWriter streamWriter)
{
foreach (DataRow dataRow in _dataTable.Rows)
{
foreach (DataColumn dataColumn in _dataTable.Columns)
{
WriteValue(streamWriter, dataRow[dataColumn.ColumnName].ToString()+"\r");
}
streamWriter.WriteLine();
}
}
Ends.Write(Ends.NewLine);
标签:
原文地址:http://my.oschina.net/isxiaoge/blog/466840