It says the ITEMS is not a member of system.windows.forms.datagrid. It only allows for ITEM. What would I do?
http://i590.photobucket.com/albums/ss348/nire06/grid.png
About the items, it depends on how many data that has the user inputted. I used inputbox so user can enter the quantity and price (int). Then when the user clicks the calculate button (button1), it will be save to datagrid and when the user clicks the button save to excel (button2), it will be...
Still it has errors. See the pic so you can see what I mean. Do you have any other way on saving it to datagrid?
http://i590.photobucket.com/albums/ss348/nire06/datagrid.png
It says that the type integer cannot be converted to System.Windows.Forms.DataGridCell. The line For i = 0 To DataGrid1.Item(9) has error on 9. And this line xlWorkSheet.Cells(i + 1, j + 1) = DataGrid1.item(i).item( j).Value.ToString() got error on i.
I already change it but it doesn't work. The blue text is still the error. Can you please help me to debug?
For i = 0 To DataGrid1.Item(rowIndex:=10, columnIndex:=10)
For j = 0 To DataGrid1.Item(rowIndex:=10, columnIndex:=10)
xlWorkSheet.Cells(i + 1, j + 1)...
This is my code. I tried to change RowCount to VisibleRowCount but it did not work. The blue text says "Public member 'Value' on type 'String' not found." Anyone help?
Imports System.Data
Imports System.Data.SqlClient
Imports Excel = Microsoft.Office.Interop.Excel
Public Class Form1...
Thanks a lot Madder. I used DataGrid, not DataGridView, but I try the code. Now, I only have one problem, in DataGrid, there's no RowCount, it is only for DataGridView. Do you know what exactly the equivalent of RowCount in DataGrid?
Hello everyone! Please bare with me because I'm new to vb.net .I do have problem, I cannot save data from datagrid to excel. I use inputbox so user can input data to datagrid. Then the user can click the button to save it to excel. Can someone please show me some code on how to create that? Thanks!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.