Click here to Skip to main content
15,889,462 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How do I populate a Strongly Typed DataSet with XML Pin
Mycroft Holmes23-Jul-08 14:02
professionalMycroft Holmes23-Jul-08 14:02 
QuestionDATETIMEPICKER IN VB.NET Pin
r_mohd22-Jul-08 22:57
r_mohd22-Jul-08 22:57 
AnswerRe: DATETIMEPICKER IN VB.NET Pin
ilprincipe23-Jul-08 1:19
ilprincipe23-Jul-08 1:19 
GeneralRe: DATETIMEPICKER IN VB.NET Pin
zahedonline23-Jul-08 1:54
zahedonline23-Jul-08 1:54 
AnswerRe: DATETIMEPICKER IN VB.NET Pin
brjames3223-Jul-08 1:33
brjames3223-Jul-08 1:33 
QuestionHow to detect if a removable storage device is write protected?? Please help... Pin
vbDigger'z22-Jul-08 21:44
vbDigger'z22-Jul-08 21:44 
AnswerRe: How to detect if a removable storage device is write protected?? Please help... Pin
Paul Conrad27-Jul-08 11:03
professionalPaul Conrad27-Jul-08 11:03 
QuestionSaving DataGidView data to Excel Pin
brjames3222-Jul-08 21:25
brjames3222-Jul-08 21:25 
I have a project where a Teacher can choose their class from a ComboBox and this is turn selects all the relevant student from an Access Database and displays this along with some extra columns in a DataGridView.

The Teacher can then add 'Penalty Points' and 'Demerits' to the student before saving them to a spreadsheet (reason being the info needs a lot of formulas to get it to work out several thing the Heads of Year want to see!). I can Insert into Excel using code such as:

Imports System.Data
Public Class Form1
    Private Sub cmdSave_Click(ByVal sender As System.Object, _
                ByVal e As System.EventArgs) Handles cmdSave.Click
        Try
            Dim MyConnection As System.Data.OleDb.OleDbConnection
            Dim myCommand As New System.Data.OleDb.OleDbCommand
            Dim sql As String

            MyConnection = New System.Data.OleDb.OleDbConnection _
            ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + _
            "'S:\Penalty Points\07-08\Test.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=0""")

            MyConnection.Open()
            myCommand.Connection = MyConnection
            sql = "Insert into [Sheet1$] (StudentId,Name) values('5','e')"
            myCommand.CommandText = sql
            myCommand.ExecuteNonQuery()
            MyConnection.Close()
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
        MsgBox("Row Added Successfully")
    End Sub
End Class


But I need to loop through the DatagridView, Inserting all rows that have been ammended. Can anyone help me out please?

Thanks in Advance Wink | ;)
AnswerRe: Saving DataGidView data to Excel Pin
brjames3223-Jul-08 6:27
brjames3223-Jul-08 6:27 
Questionhow to get combobox selected value in integer Pin
Kissy1622-Jul-08 21:24
Kissy1622-Jul-08 21:24 
AnswerRe: how to get combobox selected value in integer Pin
brjames3222-Jul-08 21:31
brjames3222-Jul-08 21:31 
GeneralRe: how to get combobox selected value in integer Pin
Kissy1622-Jul-08 22:00
Kissy1622-Jul-08 22:00 
GeneralRe: how to get combobox selected value in integer Pin
brjames3222-Jul-08 22:16
brjames3222-Jul-08 22:16 
GeneralRe: how to get combobox selected value in integer Pin
Kissy1622-Jul-08 22:43
Kissy1622-Jul-08 22:43 
AnswerRe: how to get combobox selected value in integer Pin
Tom Deketelaere23-Jul-08 1:15
professionalTom Deketelaere23-Jul-08 1:15 
GeneralRe: how to get combobox selected value in integer Pin
zahedonline23-Jul-08 1:58
zahedonline23-Jul-08 1:58 
QuestionMDI form in vb.net 2.0 Pin
vijaylumar22-Jul-08 19:19
vijaylumar22-Jul-08 19:19 
AnswerRe: MDI form in vb.net 2.0 Pin
C1AllenS22-Jul-08 20:58
C1AllenS22-Jul-08 20:58 
GeneralRe: MDI form in vb.net 2.0 Pin
zahedonline23-Jul-08 2:00
zahedonline23-Jul-08 2:00 
Questionhow to convert XML file in to MS Word document Pin
koolprasad200322-Jul-08 18:43
professionalkoolprasad200322-Jul-08 18:43 
AnswerRe: how to convert XML file in to MS Word document Pin
Ray Cassick22-Jul-08 19:38
Ray Cassick22-Jul-08 19:38 
Questionproblem receive hex data to ascii character Pin
shee_dee8622-Jul-08 17:00
shee_dee8622-Jul-08 17:00 
Questionhow can i detect or catch the event when mouse click/open any folder in windows explorer?? Pin
vbDigger'z22-Jul-08 15:10
vbDigger'z22-Jul-08 15:10 
Questioncam device control, cam picture control Pin
stephenstefl22-Jul-08 10:21
stephenstefl22-Jul-08 10:21 
QuestionConvert Vector File to image Pin
Cory Kimble22-Jul-08 5:02
Cory Kimble22-Jul-08 5:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.