在不使用拆分功能的情况下将CSV拆分为数组列表 [英] Split a CSV into array list without using the split function

查看:77
本文介绍了在不使用拆分功能的情况下将CSV拆分为数组列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



有没有人听说过在不使用拆分功能的情况下将csv文件拆分成数组列表的方法。

如果我有数据:(让我们称之为数据)

1,google.com,搜索引擎

2,codeproject.com,对于那些代码



的人,我现在听说的是我可以创建一个ArrayList

ArrayList< string> newData = new ArrayList< string>(data.read());



这应该将数据拆分成不同的元素。例如newData(0)应该说1



希望这是有道理的。



非常感谢

Hello all,

Has anyone heard of a way to split a csv file into an array list without using the split function.
If I had the data: (lets call it data)
"1",google.com,"Search engine"
"2",codeproject.com,"For those that code"

now what ive heard is that I can create an ArrayList
ArrayList<string> newData = new ArrayList<string>(data.read());

This should then split the data up into different elements. e.g newData(0) should say "1"

Hopefully that makes some sense.

Many thanks

推荐答案

The文档 [ ^ ]没有显示任何这样的构造函数。你在哪里听说过这个?
The documentation[^] does not show any such constructor. Where did you hear of this?


这篇关于在不使用拆分功能的情况下将CSV拆分为数组列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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