Thema Datum  Von Nutzer Rating
Antwort
23.02.2011 14:00:47 Sebastian
NotSolved
23.02.2011 15:31:12 Severus
NotSolved
24.02.2011 10:14:30 Sebastian
NotSolved
24.02.2011 10:32:03 Severus
NotSolved
24.02.2011 13:26:46 Severus
NotSolved
24.02.2011 14:47:06 Sebastian
NotSolved
24.02.2011 15:37:47 Severus
NotSolved
04.03.2011 10:21:13 Sebastian
NotSolved
04.03.2011 12:07:43 Severus
NotSolved
04.03.2011 12:30:20 Sebastian
NotSolved
04.03.2011 12:38:37 Severus
NotSolved
04.03.2011 13:07:36 Severus
NotSolved
04.03.2011 13:58:01 Sebastian
NotSolved
04.03.2011 17:09:08 Severus
Solved
07.03.2011 08:43:38 Sebastian
NotSolved
09.03.2011 08:59:43 Sebastian
NotSolved
09.03.2011 12:19:53 Gast6260
NotSolved
09.03.2011 13:28:30 Sebastian
NotSolved
09.03.2011 13:44:28 Severus
NotSolved
09.03.2011 14:02:30 Sebastian
NotSolved
Rot mehrer XML Daten importieren
09.03.2011 15:45:24 Severus
NotSolved
09.03.2011 15:45:29 Severus
NotSolved

Ansicht des Beitrags:
Von:
Severus
Datum:
09.03.2011 15:45:24
Views:
1079
Rating: Antwort:
  Ja
Thema:
mehrer XML Daten importieren
Sub Import_ein_blatt()
Dim Dialog As FileDialog
Dim vrtSelectedItem As Variant
Dim lngNaechsteZeile As Long
Dim strZielBlatt As String
Dim rngZielBereich As Excel.Range
Dim WS As Excel.Worksheet
Dim lngXMLLaufzahl As Long
On Error Resume Next
  
Set Dialog = Application.FileDialog(msoFileDialogOpen)
With Dialog
    .AllowMultiSelect = True
    .Title = "Bitte gewünschte Daten auswählen"
    .ButtonName = "Importieren"
    .Show

    If .SelectedItems.Count = 0 Then
        Exit Sub
    End If
    
    strZielBlatt = "Tabelle1"
    Set WS = Sheets(strZielBlatt)
    If Err.Number <> 0 Then
       Err.Clear
       Set WS = Sheets.Add(, Sheets(Sheets.Count))
       WS.Name = "Tabelle1"
    End If
    lngNaechsteZeile = 6
    lngXMLLaufzahl = 1
    For Each vrtSelectedItem In .SelectedItems
        Set rngZielBereich = WS.Range("$A$" & CStr(lngNaechsteZeile))
        '###Hier kannst Du vielleicht noch was schrauben!###
        With ActiveWorkbook.XmlMaps(lngXMLLaufzahl)
            .ShowImportExportValidationErrors = False
            .AdjustColumnWidth = True
            .PreserveColumnFilter = False
            .PreserveNumberFormatting = True
            .AppendOnImport = False
        End With
        '####################################################
        ActiveWorkbook.XmlImport URL:=vrtSelectedItem, ImportMap:=Nothing, Overwrite:=False, Destination:=rngZielBereich
        Set rngZielBereich = Nothing
        lngNaechsteZeile = WS.Cells(WS.Cells.Rows.Count, 1).End(xlUp).Row + 1
        
        lngXMLLaufzahl = lngXMLLaufzahl + 1
    Next
End With
Set WS = Nothing
End Sub

 


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
23.02.2011 14:00:47 Sebastian
NotSolved
23.02.2011 15:31:12 Severus
NotSolved
24.02.2011 10:14:30 Sebastian
NotSolved
24.02.2011 10:32:03 Severus
NotSolved
24.02.2011 13:26:46 Severus
NotSolved
24.02.2011 14:47:06 Sebastian
NotSolved
24.02.2011 15:37:47 Severus
NotSolved
04.03.2011 10:21:13 Sebastian
NotSolved
04.03.2011 12:07:43 Severus
NotSolved
04.03.2011 12:30:20 Sebastian
NotSolved
04.03.2011 12:38:37 Severus
NotSolved
04.03.2011 13:07:36 Severus
NotSolved
04.03.2011 13:58:01 Sebastian
NotSolved
04.03.2011 17:09:08 Severus
Solved
07.03.2011 08:43:38 Sebastian
NotSolved
09.03.2011 08:59:43 Sebastian
NotSolved
09.03.2011 12:19:53 Gast6260
NotSolved
09.03.2011 13:28:30 Sebastian
NotSolved
09.03.2011 13:44:28 Severus
NotSolved
09.03.2011 14:02:30 Sebastian
NotSolved
Rot mehrer XML Daten importieren
09.03.2011 15:45:24 Severus
NotSolved
09.03.2011 15:45:29 Severus
NotSolved