Read selected Excel data into DataGridView using VB.NET2008
-
At which line of code it gave you the error?
Shay Noy
modified on Sunday, July 12, 2009 6:55 AM
Well..The Error appeared at this line>> MyCommand.Fill(DtSet) What might be the problem? Thanks ~!
-
Well..The Error appeared at this line>> MyCommand.Fill(DtSet) What might be the problem? Thanks ~!
I made a simulation by changing the name of the Qty column in my excel file and I got the same error message as you got. The problem is that you do not have a Qty column in your excel file. You have to change the "Select Qty" in the query to "Select YourNameField"
Shay Noy
-
I made a simulation by changing the name of the Qty column in my excel file and I got the same error message as you got. The problem is that you do not have a Qty column in your excel file. You have to change the "Select Qty" in the query to "Select YourNameField"
Shay Noy
I do have a Qty column located at A3 cell here at Sheet1 actually. But I don't know why can cause this problem. My data is start at A4 column,I cannot put my Qty column to A1 because there is other data in A1 field in my Excel. Do you have any idea how should solve this problem? Thanks Regards Drex
-
I do have a Qty column located at A3 cell here at Sheet1 actually. But I don't know why can cause this problem. My data is start at A4 column,I cannot put my Qty column to A1 because there is other data in A1 field in my Excel. Do you have any idea how should solve this problem? Thanks Regards Drex
Have you got data in A1, A2 lines? If yes you must leave those lines blank. Try it and reply
Shay Noy
-
Have you got data in A1, A2 lines? If yes you must leave those lines blank. Try it and reply
Shay Noy
No,it was blank field for A1 and A2 field here actually. My table start with A3 actually. Do you have any other way beside this? Is that Interop can help to solve this problem? Do you have sample for using interops? Thanks~! Regards Drex
-
No,it was blank field for A1 and A2 field here actually. My table start with A3 actually. Do you have any other way beside this? Is that Interop can help to solve this problem? Do you have sample for using interops? Thanks~! Regards Drex
I have another way, if you want, by linking the excel table to MS Access and then using access table to continue you project. But, let's try to understand what you problem is. If you want send me your excel file by email (helelark@gmail.com) and the button1 code too, I will check and re-send it to you. Just tell me if you send it too me by email so I will check my email
Shay Noy
-
I have another way, if you want, by linking the excel table to MS Access and then using access table to continue you project. But, let's try to understand what you problem is. If you want send me your excel file by email (helelark@gmail.com) and the button1 code too, I will check and re-send it to you. Just tell me if you send it too me by email so I will check my email
Shay Noy
I just email you my Excel file. Hope you can check it for me. Thank you~! Regards Drex
-
I just email you my Excel file. Hope you can check it for me. Thank you~! Regards Drex
Just remove the 2 first rows, A1 and A2 and it will works fine
Shay Noy
-
Just remove the 2 first rows, A1 and A2 and it will works fine
Shay Noy
Yes,but the problem is I must get it work with A4 as the row header. Because I need to grab the data from the OrderingFormat.xls file I have send to you. If I start with A1 as the row header,it won't works in my project. Do you have any other ideas? Thank you. Regards Drex
-
Yes,but the problem is I must get it work with A4 as the row header. Because I need to grab the data from the OrderingFormat.xls file I have send to you. If I start with A1 as the row header,it won't works in my project. Do you have any other ideas? Thank you. Regards Drex
Sorry, I saw the second file you sent me only after sending you this reply. I have checked in google and the solution is as following: select Qty from [Sheet1$A3:C6]... A3:first column,first row C6:last column,last row Good luck
Shay Noy
-
Sorry, I saw the second file you sent me only after sending you this reply. I have checked in google and the solution is as following: select Qty from [Sheet1$A3:C6]... A3:first column,first row C6:last column,last row Good luck
Shay Noy
Yes,I got the solution now. Thank you so much for your help on this issue Mr. Eric Hilel. I will solve the problem here. Thanks alot for your kind effort. Regards Drex
-
Yes,I got the solution now. Thank you so much for your help on this issue Mr. Eric Hilel. I will solve the problem here. Thanks alot for your kind effort. Regards Drex
You are welcome
Shay Noy