解决导出的csv单元格中数字过长时变成科学计数法的问题

来源:http://blog.csdn.net/michaelgong/article/details/6251347

将数据写入到CSV文件中--出现“科学计数法”问题,已解决,与Excel有所不同,

在数据后面加上"/t"就可以咯。。。。

[c-sharp] view plain copy
  1. 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() + ",");   
  2. Ends.Write(Ends.NewLine);  

展开阅读全文

没有更多推荐了,返回首页