Link to home
Start Free TrialLog in
Avatar of Heath Hall
Heath HallFlag for United States of America

asked on

import xls data into datagridview on form

I'm attempting to allow users to either manually enter data or import an XLS file to fill a datagridview. I'm having dificulty getting the formatting to correct fill the DGV.

the project file and sample files are at this link

https://filedb.experts-exchange.com/incoming/ee-stuff/6738-Avid-File-Renamer.zip 
ASKER CERTIFIED SOLUTION
Avatar of Craig Wagner
Craig Wagner
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Heath Hall

ASKER

I'm getting an error at the call for "XLSPath" (line 6) and at line 13
Did you declare the variable?
I thought I did in the snippet right above this section.
'let user select xls file to process
    Private Sub ImportXLS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ImportXLS.Click
        If OpenFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
            Dim XLSPath As String = OpenFileDialog.FileName
        End If
    End Sub

Open in new window