Completed

En Visual basic .Net (2008 Express) Cargar Planialla Excel en Datagridview

Published on the February 15, 2017 in IT & Programming

About this project

Open

Hola
El trabajo es
En Visual basic .Net (2008 Express) Cargar Planialla Excel en DataGridView

Tengo el equipo con  via Team Viewer para trabajar si se requiere


Hemos estado trabajando en el Codigo y la rutina para leer las planillas excel en VB.NET.
Por alguna razon lee todos los datos excepto algunos numericos.

Actualmente el trabajo es corregir esto ultimo.
¿Quien puede hacerlo?

  If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
            Dim sr As New System.IO.StreamReader(OpenFileDialog1.FileName)
            Dim filename As String = OpenFileDialog1.FileName

            Dim w_planilla As String = filename
            Dim objExcel As New Excel.Application
            Dim objWorkBook As Excel.Workbook = objExcel.Workbooks.Open(w_planilla)

            For Each objWorkSheets In objWorkBook.Worksheets
                'SheetList.Add(objWorkSheets.Name)
            Next

            Dim MiConexion As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties = 'Excel 8.0'; Data Source=" & w_planilla & ";")
            'Dim MiConexion As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties='Excel 8.0';HDR=yes; Data Source=" & w_planilla & ";Persist Security Info=False;")
            Dim MiAdaptador As New Oledbdataadapter("select * from [" & objworkbook.Worksheets(1).name & "$]", MiConexion)
            Dim MiDataSet As New DataSet()
            Dim MiEnlazador As New BindingSource

            Dim commandbuilder As New OleDb.OleDbCommandBuilder(MiAdaptador)
            MiConexion.Open()
            MiAdaptador.Fill(MiDataSet)
            MiEnlazador.DataSource = MiDataSet.Tables(0)
            Me.DataGridView1.DataSource = MiEnlazador
            MiConexion.Close()
            sr.Close()
        End If

Atte
VEG

Category IT & Programming
Subcategory Desktop apps
What is the scope of the project? Medium-sized change
Is this a project or a position? Project
I currently have I have specifications
Required availability As needed
Experience in this type of projects Yes (I have managed this kind of project before)
Required platforms Windows

Delivery term: Not specified

Skills needed

Other projects posted by V.