在Visual Basic WindowsForm中将任何csv文件读取到DataGridView [英] Read any csv file to DataGridView in visual basic WindowsForm

查看:79
本文介绍了在Visual Basic WindowsForm中将任何csv文件读取到DataGridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用OpenFileDialog打开.csv文件并在DataGridView上访问它。这就是全部。

Open .csv file using OpenFileDialog and access that on DataGridView.That's all.

推荐答案

您可以逐行读取文件,之后可以使用string.split方法溢出这些行。分裂的符号通常是';'。之后,您可以将DataGridView绑定到结果。

you can read the file line by line, after that you can spilt the lines, using the string.split method. The symbol to split is usualy a ';'. After that you can bind the DataGridView to the result.

您的代码是什么?

问候,Chris


这篇关于在Visual Basic WindowsForm中将任何csv文件读取到DataGridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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