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.

Daten aus Access nach Excel

Empfohlene Antworten

Veröffentlicht

hallo,

wäre schön, wenn mir jemand weiterhelfen könnte.

ich möchte folgendes machen: gesteuert von einem visual basic programm sollen daten aus einer access tabelle in ein excel sheet eingefügt werden. wie kann ich sowas machen ?

vielen dank schonmal im voraus!

Moin !

fallen mir jetzt zwei Möglichkeiten ein:

-Wenn Du eine komplette Access Tabelle in Excel konvertieren möchtest gibt es diesen Befehl:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "<Tabellenname>", <Zieldatei>

dann legt er eine Excel 97 Datei an.

-Wenn Du nur bestimmte Daten haben willst, kannst Du mit Hilfe eines Excel Objektes direkt in die Excel-Tabelle schreiben, das funzt etwa so:

Dim obj_EX As Excel.Application

Set obj_EX = GetObject(, "Excel.Application")

obj_EX.Workbooks.Add 'neues Spreadsheet anlegen oder

obj_EX.Workbooks.Open FileName:=<Quelldatei> 'vorhandene Datei öffnen

dann kannst du mit

obj_EX.Cells (<Zeile>, <Spalte>) = .....

direkt reinschreiben.

Mit dem GetObjekt funzt allerdings nur wenn Excel bereits geöffnet ist. Ansonsten fang am besten die Fehler auf, Err.Number = 429 ist die für Excel nicht da, und las ihn in dem Fall Excel mit

Set obj_EX = CreateObject("Excel.Application")

öffnen.

hoffe das hilft Dir !

gruß

Christian

-------------------------------------------------------------

"Schwerer Ausnahmefehler" - wenn das mal ne Ausnahme wär...

vielen dank für die tipps !

hat geklappt!

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.