简体   繁体   English

在表格VB中插入电子表格

[英]Insert a spreadsheet in a form VB

I am trying to insert a spreadsheet like functionality in a form where user can copy a subset data from one spreadhseet and paste it in the spreadsheet in the form. 我正在尝试在一种表格中插入类似功能的电子表格,以便用户可以从一个电子表格中复制子集数据并将其粘贴到表格中的电子表格中。 I tried creating a datasheet form but I am unable to add anything to it. 我尝试创建数据表表单,但无法向其中添加任何内容。 I also tried creating bunch of text boxes for representing columns but in this case I can only paste one row from spreadhseet to this form. 我也尝试创建一堆用于表示列的文本框,但是在这种情况下,我只能从spreadseet粘贴一行到此表单。

Any help or pointer will be of great help. 任何帮助或指针都会有很大帮助。

创建一个类,该类允许用户上传文件 (已以.csv格式保存的电子表格),然后使用TextFieldParser对象读取文件。

You could use a List box, however you will need to set the columns and the user will have to make sure they select only that amount of columns. 您可以使用“列表”框,但是您将需要设置列,并且用户必须确保他们仅选择该数量的列。 Then have a paste button in the form which will take the clipboard and add it to the list box. 然后在表单中有一个粘贴按钮,它将粘贴剪贴板并将其添加到列表框中。

I got it working using datasheet bound to a table. 我使用绑定到表的数据表来工作。 thanks for the help guys. 谢谢你们的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM