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.

VB.NET Excel Zugriff

Empfohlene Antworten

Veröffentlicht

Hallo!

Ich möchte aus einem VB.NET-Programm Daten in ein Excel-File schicken mit:

oben: Imports Excel (habe Verweis hinzugefügt)

in der Prozedur:

Dim excel As Application = New Application

Dim Pfad As Object = System.Windows.Forms.Application.StartupPath & "\Rechnung.xls"

Dim Kunde As Object = "Kunde" 'Feldname im Excel-File

und dann:

excel.Visible = True

System.Diagnostics.Process.Start(Pfad)

excel.ActiveSheet.cells(Kunde) = Me.lblFirma.Text

Das Excel-File wird zwar geöffnet, aber keine Daten reingeschieben. Kann mir jemand sagen warum?

LG Annja

  • 2 Wochen später...

Jepp,

weil du 2 verschiedene Sachen machst. Die Referenz auf dein Excel bietet dir quasi ein "In-Memory-Excel", also den Zugriff auf das Excel Objektmodell, da schreibst du mit deiner Anweisung auch rein, der User sieht aber kein Excel auf dem Bildschirm.

Mit Process.Start() startest du jetzt Excel.

Du hast dann also einmal Excel gestartet und einmal den Zugriff aufs Excel Objektmodell. Das eine hat aber nichts mit dem anderen zu tun, das sind 2 verschiedene Prozesse.

Wenn du das Excel Sheet nicht sehen musst, füll weiter wie gehabt, und speicher das das Sheet danach einfach ab ( ich glaube .Save(...) ). Wenn du das fertige Sheet sehen willst kannst du Process.Start machen und das gespeicherte Excel-Sheet als Parameter übergeben.

Je nachdem was du vorhast, guck dir mal die Visual Studio Tools for Office an, VSTO.

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.