在richtextbox vb.net中的表中显示Excel数据 [英] Displaying excel data in a table in richtextbox vb.net

查看:234
本文介绍了在richtextbox vb.net中的表中显示Excel数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在richtextbox中导入一些excel表。但问题是,当在富文本框中导入数据表时,它看起来很奇怪,如:



     ------------------------- Sheet1 -------------------- -----

  [String]                Pic [String]             唯一ID [String]       前缀[String]         名字[String]   
 姓氏[String]       性别[String]         标题[String]           公司[String]         电话[String]         
  Mobile [String]         传真[String]              B.Email [String]          P.Email [String]         参考[String]       地址
[String]         地址2 [String]       国家[String]          City [String]            Zip [String]              Facebook
[String]        



有没有办法显示数据,例如excel显示数据或至少显示表格中的数据以及这些数据是不可能的,至少在排列的管理器中显示它们(我的意思是删除[string]的东西,所有列名称将并排,
单元格值低于另一个...正确排列)???

解决方案

为什么使用RichTextBox? DataGridView更适合显示表格...



http://vb.net-informations.com/datagridview/vb.net_datagridview_import.htm


I am importing some excel sheet in a richtextbox.But the problem is, when the data table is imported in the rich textbox it looks really weird , something like :

    ------------------------- Sheet1 -------------------------
 [String]                Pic [String]             Unique id [String]       Prefix [String]          First name [String]      Last name [String]       Gender [String]          Title [String]           Company [String]         Phone [String]           Mobile [String]          Fax [String]             B.Email [String]         P.Email [String]         Reference [String]       Address [String]         Address 2 [String]       Country [String]         City [String]            Zip [String]             Facebook [String]        

Is there any way to display the data like excel displays the data or atleast display the data in a table and if these are not possible, atleast display them in an arranged mannaer(i mean removing the [string] thing,all column name would be side by side and cell values one below the other...properly arranged )???

解决方案

Why are you using a RichTextBox? A DataGridView is better suited for displaying tables...

http://vb.net-informations.com/datagridview/vb.net_datagridview_import.htm


这篇关于在richtextbox vb.net中的表中显示Excel数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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