开发者

merge data into csv with c#

I have a scenario where data is read from a database and written to a csv file. The data has 3 columns Name, Date and Price.If the csv doesn't exist, a new file is created and the dat开发者_JAVA技巧a is written. If the csv does exist, I have to insert the data relative to the Date data already in the csv. How can I go about doing this?


Easiest way is to parse your csv back in a datastructure, append the data from the database and sort on the date. Then overwrite the file with the sorted data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜