2020
10-09
10-09
c# 对CSV文件操作(写入、读取、修改)
一、DataTable数据写入CSV文件publicstaticvoidSaveCSV(DataTabledt,stringfullPath)//table数据写入csv{System.IO.FileInfofi=newSystem.IO.FileInfo(fullPath);if(!fi.Directory.Exists){fi.Directory.Create();}System.IO.FileStreamfs=newSystem.IO.FileStream(fullPath,System.IO.FileMode.Create,System.IO.FileAccess.Write);System.IO.StreamWritersw=newSystem.IO.StreamWriter...
继续阅读 >