mache gerade meine ersten Gehversuche mit Excel-Anwendungen unter Python.
Lässt sich eigentlich der "gesamte" Excel-VBA-Code auch unter Python nutzen?
Bei folgendem Code bekomme ich nämlich Probleme:
Code: Alles auswählen
# -*- coding: iso-8859-1 -*-
import win32com.client
import string
from itertools import count
## Excel Anwendung öffnen
MyApplication = win32com.client.Dispatch("Excel.Application")
MyApplication.Visible = True
## Arbeitsmappe auswählen oder neue erstellen
MyWorkbook = MyApplication.Workbooks.Open("D:\YVL 2.0_E1001_Bor.xls")
Tabellenname = MyApplication.Application.Caller.Parent.Name
MyWorkSheet = MyWorkbook.Worksheets(Tabellenname)
Der VBA-Code
Code: Alles auswählen
Tabellename = Application.Caller.Parent.Name
Gruß,
Jean[/quote]