Servus Leute, ich hab en kleines Problem mit einem Excel Import.
Ich habe einen Importagent, der mir beim Ausführen jeweils neue Dokumente erstellt. Die Felder Ko_1, Ge_1 usw. sind Zeitfelder bzw Daten. Beim Importieren macht mir der Agent Textdaten daraus.
Es steht also 0,29.. statt 07:08 in dem Feld Ko_1. Die Daten in Excel sind Zeitdaten.
Habt ihr ne Idee, wie ich beim Import die Daten auch als Zeit-Werte importieren kann?
Dank euch
Der Agent sieht folgendermaßen aus:
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set xlApp = CreateObject("Excel.Application")
xlapp.Visible = True ' Excel wird angezeigt
xlApp.Workbooks.Open "C:\Dateiname.xls" ' Datei öffnen
xlApp.Sheets("Tabelle1").Select ' Springe in die Tabelle "Tab 1"
If Not db.isopen Then
Msgbox "DB konnte nicht geöffnet werden"
Exit Sub
End If
For Zeile = 2 To 10
Set doc = New NotesDocument(db)
doc.Form = "Dokument"
doc.Name = xlApp.Cells( Zeile, 1).Value
doc.Woche= xlApp.Cells( Zeile, 2).Value
doc.Ko_1 = xlApp.Cells( Zeile, 3).Value
doc.Ge_1 = xlApp.Cells( Zeile, 4).Value
doc.Ko_2 = xlApp.Cells( Zeile, 5).Value
doc.Ge_2 = xlApp.Cells( Zeile, 6).Value
doc.Ko_3 = xlApp.Cells( Zeile, 7).Value
doc.Ge_3 = xlApp.Cells( Zeile, 8).Value
doc.Ko_4 = xlApp.Cells( Zeile, 9).Value
doc.Ge_4 = xlApp.Cells( Zeile, 10).Value
doc.Save True, True, True
Next
End Sub