读/写csv文件 [英] read/ write csv file

查看:96
本文介绍了读/写csv文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在wpf项目中工作.我需要读取/写入csv文件.我可以读取csv文件.但是当我写新记录时,旧记录不见了.请您帮帮我.有csv的替代方法吗? .谢谢高级....

I am working in a wpf project.i need to read/write csv file.i can read the csv file.but when i write new record the old record gone.would you please help me.is there any alternative of csv. thanks in advanced...

推荐答案

在没有看到代码的情况下很难猜测出问题所在,但是我相信您只是覆盖了文件,例如通过使用File.WriteAllLines.您应该使用例如来附加行函数File.AppendAllLines.
It is hard to guess what your problem is without seeing your code, but I believe you simply overwrite the file e.g. by using File.WriteAllLines. You should append your lines instead by using e.g. the function File.AppendAllLines.


这篇关于读/写csv文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆