• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 282
  • Last Modified:

Some date fields are wrongly read as null from excel spreadsheet using Microsoft.Jet.OLEDB.4.0

       Dim ConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""

        Dim sqlStatement As String = "SELECT * FROM [" + ExcelFileName + "]"
        Dim con As New OleDbConnection
        Try


            dap = New OleDbDataAdapter( _
                      sqlStatement, _
                        con)
            dst = New DataSet()
            dap.Fill(dst)
Some date fileds are filled as null even though they have valid dates,  Is it something to do with date format vs. numeric format?

How to fix it?
0
akulas
Asked:
akulas
1 Solution
 
PakaCommented:
To troubleshoot this one, you'll need to comment out your exception handing to see how the nulls are being populated.  Do you have more code to view?
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now