Autor Thema: Wie kann ich 20000 Datensätze aus Excel importieren?  (Gelesen 5562 mal)

Offline Silent_Bob

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 620
  • Geschlecht: Männlich
    • Insta
Guten Morgen,

ich habe mal wieder ein Problem.
Ich habe eine Excel Tabelle bekommen, und muss diese nun in Notes importieren.

Die Tabelle hat knapp 20000 Datensätze und 4 Spalten. Wenn ich z.B. die Excel Tabelle im Lotus Format abspeichere, ist die WK* Datei immer maximal 8192 Datensätze lang.

Wie kann ich Excel2003 dazu bringen die Tabelle so abzuspeichern, dass Lotus diese komplett importieren kann?

Vielen Dank im voraus

Offline Gandhi

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 918
  • Geschlecht: Männlich
  • Domino for the masses
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #1 am: 05.10.05 - 11:51:16 »
als csv abspeichern? Tabbed Text? +.COL Datei

Oder per Notesagent zeilenweise auslesen (gibts hier im Forum bestimmt Beispiele für)
Der "Wenn ich" und der "Hätt' ich" das sind zwei arme Leut'
oder für den Süden:
Hatti Tatti Wari - san drei Larifari

Offline Silent_Bob

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 620
  • Geschlecht: Männlich
    • Insta
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #2 am: 05.10.05 - 12:20:03 »
Ich bekomme das nicht hin. CSV klappt nicht. Wenn ich das Probiere, ist die Datenbank nach dem Import trotzdem leer.
Ich habe in der Tabelle die Spaltenüberschriften gleichgesetzt mit den Feldnamen in der Datenbank.

Versuche ich das über eine tabellarische Textdatei, wird das Format völlig ignoriert.
Ich mache das so, wie in der Notes Hilfe, aber die Tab Trennzeichen werden beim Importvorgang völlig ignoriert, sodass ich zwar meine 20000 Dokumente habe, aber in den Feldern nur Müll drin stehet.

Ich habe keine Ahnung was eine COL Datei ist, und in der Hilfe kann ich auch nichts finden, wie man so eine Datei erstellt  :(

Offline Gandhi

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 918
  • Geschlecht: Männlich
  • Domino for the masses
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #3 am: 05.10.05 - 12:43:56 »
nach .col in der Hilfe gesucht erhalte ich 3 Treffer, die das ziemlich genau beschreiben :-:
Der "Wenn ich" und der "Hätt' ich" das sind zwei arme Leut'
oder für den Süden:
Hatti Tatti Wari - san drei Larifari

Offline m3

  • Freund des Hauses!
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 8.102
  • Geschlecht: Männlich
  • Non ex transverso sed deorsum!
    • leyrers online pamphlet
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #4 am: 05.10.05 - 12:44:19 »
Zitat
How many documents can be imported into a view?
Individual documents: up to 350K;
from a spreadsheet, 8192 rows;
5000 separate documents
http://www.thenorth.com/northern.nsf/0/4100857248b8b82185256d350058f7e4?OpenDocument
HTH
m³ aka. Martin -- leyrers online pamphlet | LEYON - All things Lotus (IBM Collaborations Solutions)

All programs evolve until they can send email.
Except Microsoft Exchange.
    - Memorable Quotes from Alt.Sysadmin.Recovery

"Lotus Notes ist wie ein Badezimmer, geht ohne Kacheln, aber nicht so gut." -- Peter Klett

"If there isn't at least a handful of solutions for any given problem, it isn't IBM"™ - @notessensai

Offline Silent_Bob

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 620
  • Geschlecht: Männlich
    • Insta
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #5 am: 05.10.05 - 13:08:42 »
...oops. Bei bei der Suche in der Hilfe nach COL den Punkt vor COL weggelassen. Mit Punkt davor gibts tatsächlich mehr treffer...

Gut, ich probier da mal weiter rum.
Danke

Offline Gandhi

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 918
  • Geschlecht: Männlich
  • Domino for the masses
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #6 am: 05.10.05 - 13:10:20 »
Wenn ich aber m3s anmerkungen lese empfehle ich das in Tranchen zu 5000 Stück zu machen.
Der "Wenn ich" und der "Hätt' ich" das sind zwei arme Leut'
oder für den Süden:
Hatti Tatti Wari - san drei Larifari

Offline koehlerbv

  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 20.460
  • Geschlecht: Männlich
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #7 am: 05.10.05 - 13:12:39 »
Noch besser wäre aber das direkte Auslesen aus dem Excel-Sheet - u.a. braucht man sich dann um irgendwelche Importlimits überhaupt nicht zu kümmern.

Bernhard

Offline PsychoDad

  • Frischling
  • *
  • Beiträge: 36
  • Geschlecht: Männlich
  • ...und wer weint um mich? Argentinien!?
Die Titanic wurde von Profis gebaut - die Arche Noah von einem Amateur...

klaussal

  • Gast
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #9 am: 05.10.05 - 15:06:36 »
Ich mach's immer hiermit:
Code
Sub Click(Source As Button)
'The action button is located on a view
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim temp1 As String
Dim temp2 As String
Dim temp3 As String
Dim temp4 As String
Dim temp5 As String
Dim zaehl As String
zaehl = 0
Dim xlApp As Variant
Dim xlSheet As Variant
Dim cursor As Integer
Dim recordcheck As String
On Error Goto ERRORLABEL
Dim FileName As String
Dim DefaultFileName As String
DefaultFileName="c:\Austausch\bedarf.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
     'Create an Excel object for the spreadsheet
     'It may be necessary to have the proper MS Office DLLs installed on the PC running this application
     'That is, the person must be able to open the XLS file with Excel
Set xlApp = CreateObject("excel.Application")
xlApp.Application.Workbooks.Open Filename
'File not found will return ERR=213 and the routine will be ended
With xlApp.workbooks.Add
     'Not sure what this line is for, unless it's to be sure that at least one workbook is present in the XLS file
End With
'Stop
Set xlSheet = xlApp.Workbooks(1).Worksheets(1)
recordcheck="x"
r=1 ' Row counter - first row contains fieldnames from the database;
'these fieldnames are not needed as long as the spreadsheet follows a specified format
While recordcheck <>"ENDE"
           'Recordcheck = "0" when there is no value in the first cell of the row,  if integer, or "", if string
           'Important - Set r to a value that will stop the import routine without missing any data, if the other criteria do not
'For this example, six columns are imported
cursor=0
r=r+1
temp1=xlSheet.Cells(r,1).value
recordcheck=Cstr(temp1)
If recordcheck="0" Then Goto Finished ' Avoid generating empty record
temp2=xlSheet.Cells(r,2).value
temp3=xlSheet.Cells(r,3).value
temp4=xlSheet.Cells(r,4).value
temp5 =xlSheet.Cells(r,5).value
temp6 =xlSheet.Cells(r,6).value
temp7 =xlSheet.Cells(r,7).value
           'The above lines lines could be combined with those below, but keep separate for ease in debugging until ready to finalize the code
Set doc = New NotesDocument(db)
doc.Form = "m_artikel"
doc.artikel= temp1
doc.farbe= temp2
doc.firma = temp3
doc.artikelnummer = temp4
doc.preis = temp5
doc.kategorie = "Reinigung"
doc.lagerbestand =1
doc.mindestbestand = 1
doc.warnmenge = 1
Call Doc.Save(True, False)
zaehl = zaehl + 1
Print "Importiert :" + zaehl
Finished:
Wend
Goto SubClose
ERRORLABEL:
     'Msgbox "An error was encountered."
     'Print "Error: " Error(), "   Err:" Err(), " Erl:" Erl()
If Err=213 Then
Messagebox Filename & " was not found. Verify Path and Filename, then try the Import again."
Exit Sub
Else
Messagebox "Error" & Str(Err) & ": " & Error$
End If
Resume Next
SubClose:
xlApp.activeworkbook.close
xlApp.Quit
Set xlapp = Nothing
Set view=db.getview("a_artikel_alle")
Call ws.viewrefresh
End Sub

Offline Gandhi

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 918
  • Geschlecht: Männlich
  • Domino for the masses
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #10 am: 05.10.05 - 15:07:10 »
Zitat
Wie bei fast allen Fragen - die Antwort findest Du bei Eknori!
Interessant in dem Zusammenhang mit dieser Behauptung wäre zu überprüfen, ob Ulrich oder der String Eknori irgendwas mit der Zahl 42 (die ja bekanntlich die Antwort auf das Leben, das Universum und den ganzen Rest ist) in Verbindung zu bringen ist... 8)
Der "Wenn ich" und der "Hätt' ich" das sind zwei arme Leut'
oder für den Süden:
Hatti Tatti Wari - san drei Larifari

Offline PsychoDad

  • Frischling
  • *
  • Beiträge: 36
  • Geschlecht: Männlich
  • ...und wer weint um mich? Argentinien!?
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #11 am: 05.10.05 - 15:23:35 »
Ich dachte immer Ulrich hätte einen Preis für Norwegen bekommen!? ???
Die Titanic wurde von Profis gebaut - die Arche Noah von einem Amateur...

Offline koehlerbv

  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 20.460
  • Geschlecht: Männlich
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #12 am: 05.10.05 - 15:35:32 »
Hat er nicht, weil seine beiden Beine gleich lang sind, vor allem das linke.

Bernhard

Offline m3

  • Freund des Hauses!
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 8.102
  • Geschlecht: Männlich
  • Non ex transverso sed deorsum!
    • leyrers online pamphlet
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #13 am: 05.10.05 - 15:41:33 »
Das heißt, er durfte die Schweiz machen? ;)
HTH
m³ aka. Martin -- leyrers online pamphlet | LEYON - All things Lotus (IBM Collaborations Solutions)

All programs evolve until they can send email.
Except Microsoft Exchange.
    - Memorable Quotes from Alt.Sysadmin.Recovery

"Lotus Notes ist wie ein Badezimmer, geht ohne Kacheln, aber nicht so gut." -- Peter Klett

"If there isn't at least a handful of solutions for any given problem, it isn't IBM"™ - @notessensai

Offline Gandhi

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 918
  • Geschlecht: Männlich
  • Domino for the masses
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #14 am: 05.10.05 - 15:50:15 »
Es könnte aber auch sein, dass er die ersten Notes DBs mit Emotionen entwickelt hat...ein paar ständig gut gelaunte und eine depressive...
Der "Wenn ich" und der "Hätt' ich" das sind zwei arme Leut'
oder für den Süden:
Hatti Tatti Wari - san drei Larifari

Offline koehlerbv

  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 20.460
  • Geschlecht: Männlich
Re: Wie kann ich 20000 Datensätze aus Excel importieren?
« Antwort #15 am: 05.10.05 - 15:51:47 »
Genug off-topic ...

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz