直接上正题,现有excel数据:

1.直接选中复制
2.在rubymine中打开rails console,粘贴到字符串里:

3.一句搞定!<pre>
arr = str.split("\n").map{|x|x.split("\t")}
</pre>

4.再输出看一下:

直接上正题,现有excel数据:
1.直接选中复制
2.在rubymine中打开rails console,粘贴到字符串里:
3.一句搞定!<pre>
arr = str.split("\n").map{|x|x.split("\t")}
</pre>
4.再输出看一下:
本文标题:excel中数据转换为二维数组
本文链接:https://www.haomeiwen.com/subject/ufipsttx.html
网友评论