进口CSV永远使用PowerShell
我正在尝试import-csv
是3GB并将其存储在变量中,然后根据所有数据运行脚本。我需要文件中的所有信息。导入命令需要花费数小时才能导入数据。是否有更快的方法可以实现这一目标?
谢谢
I am trying to import-csv
of a file that is 3GB and store it in a variable and then run a script based on all that data. I need all the information in the file. The import command is taking hours though to import the data. Is there a faster way to accomplish this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看
system.io.io.streamreader
和system.io.file
。当我不得不处理一个大数十或数十万行-CSV文件时,这是我以任何效率进行操作的唯一方法。这是一个例子。
Look into
System.IO.StreamReader
andSystem.IO.File
. When I had to process a large - tens or hundreds of thousands of lines - CSV file, that was the only way I could do it with any efficiency.Here's an example.