Folg. Code liefert e+ Zahlen: 3,519378294e+11 Hat jemand eine Idee warum?
test.xls:
Number
351937829402
436991907594
B
Public Sub test()
Dim row As Long
Dim rs As New ADODB.Recordset
Tabelle1.Cells.Clear
'Erstelle Datenbankverbindung
Set con = Connector.createConnection("EXCEL", "test.xls", True) 'header=True
row = 1
Sql = "select * from [Tabelle1$]"
rs.Open Sql, con, adOpenStatic, adLockReadOnly
If Not rs Is Nothing Then
If (rs.State And adStateOpen) = adStateOpen Then
While Not rs.EOF
Debug.Print rs.Fields(0)
row = row + 1
rs.moveNext
Wend
End If
End If
End Sub
createConnection-Auszug
con.provider = "Microsoft.ACE.OLEDB.12.0"
con.ConnectionString = "Data Source='" & fullpath & "'; " & "Extended Properties='Excel 12.0 Xml;HDR=" & IIf(Not header, "No", "Yes") & ";IMEX=1'"
Output
3,519378294e+11
4,3699190759e+11
B
|