Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Excel Tabelle nach Word kopieren

Empfohlene Antworten

Hi @ all,

ich steh hier vor einem kleinen Problem. Ich möchte gerne ein paar Daten die ich über ein RecordSet aus einem DataGrid (in VB6) auslese und danach in eine Excel Tabelle schreibe nach Word kopieren. Genauer gesagt die Tabelle die ich mir erzeugt habe soll nach Word kopiert werden. Hat jemand von euch einen brauchbaren Quellcode für sowas. Wenn ich die Tabelle einfach über Select kopiere und dann Selection.copy wähle funktioniert es nicht.


Dim xlApp As Excel.Application

Dim xlBook As Excel.Workbook

Set xlApp = New Excel.Application


xlApp.Visible = False

Set xlBook = xlApp.Workbooks.Add

'

'Hier steht normaler weise der Code für das Füllen der Exceltabelle

'

'und jetzt zu meinem Kopierversuch:

xlBook.Sheets("Tabelle1").Range("A1").Offset(I,K).Select 'I+K = Zellenangab.

Selection.copy

...

Also wichtig ist noch zu sagen, das ich nicht weiß wie groß die jeweilige Tabelle ist, daher angaben mi I und K

Ich weiß auch das die jetzige Select Anweisung nur ein Zelle markiert, aber wie gesagt, weiß nicht wie ich es anders gestallen könnte... vermutlich irgendwas über Cell(...)

Aber Wie??? :confused:

Danke für eure Hilfe

Ok, das mit dem markieren und kopieren hab ich in den Griff bekommen...


xlBook.Sheets("Tabelle1").Range(Cells(1,1),Cells(I,K)).Select

xlApp.Selection.Copy

Jetzt fehlt mir quasi nur noch die andere hälfte vom Code nämlich wie ich die ExcelTabelle wieder in Word einfüge... Kann mir da vielleicht einer weiter helfen???

Sorry für den verschwendeten Platz, hab auch für mein kopierproblem ne Lösung gefunden...


WordApp.Selection.Paste

Das ist auch schon die Lösung. Wie gesagt sorry für den Post, aber vielleicht hilfts ja auch anderen, ansonsten kann der Post ja auch wieder gelöscht werden...

SORRY

BAIT

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.