Das Notes Forum

Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: C_T am 03.04.07 - 14:54:00

Titel: Probleme mit nem Excelimport
Beitrag von: C_T am 03.04.07 - 14:54:00
HI  @all

Ich habe ein problem mit einem import Von Excel in Notes.

Dim session As New NotesSession
   On Error Goto ERRORLABEL

   Dim db As NotesDatabase
   Dim xlApp As Variant
   Dim xlSheet As Variant
   Dim cursor As Integer
   Dim FileName As String
   Dim DefaultFileName As String

   Set db = session.CurrentDatabase

   DefaultFileName = "w:\Excel.xls"

   NamePrompt$="Enter the complete Path and File Name of the Excel file to be imported:" &Chr(13)
   FileName=Inputbox(NamePrompt$,"Import File Name Specification",DefaultFileName,100,100)

   If FileName="" Then
      Exit Sub
   End If
   
   Set xlApp = CreateObject("excel.Application")
   xlApp.Application.Workbooks.Open Filename
   ' Wenn nicht gefunden wird ERR=213 zurückgegeben - Abbruch
   With xlApp.workbooks.Add
   End With
   
   Set xlSheet = xlApp.Workbooks(1).Worksheets(1)
   recordcheck="x"
   r=5 ' Spaltenzähler;
   '__________________Anfang Schleife________________________
   While recordcheck <>"ENDE"
      cursor=0
      r=r+1
      temp=xlSheet.Cells(r,1).value
      recordcheck=Cstr(temp)
      If recordcheck="" Then
         xlApp.activeworkbook.close
         xlApp.Quit
         Set xlapp = Nothing
......


Nun ist das Problem das er mir bei den beiden Zeilen

         xlApp.activeworkbook.close
         xlApp.Quit

jeweils einen Fehler auswirft.

Warum????

Wenn noch mehr Details notwendig sind einfach melden schonmal vielen Dank  für eure Hilfe...

CU
C_T
Titel: Re: Probleme mit nem Excelimport
Beitrag von: C_T am 03.04.07 - 14:58:16
Komisch naja jetzt läufts auf einmal doch

SRY fürs SPAMMEN

TROTZDEM Danke

CU

C_T